Presentation is loading. Please wait.

Presentation is loading. Please wait.

Objects and Properties Alice. Objects in Alice Objects already exist. Hundreds of them.

Similar presentations


Presentation on theme: "Objects and Properties Alice. Objects in Alice Objects already exist. Hundreds of them."— Presentation transcript:

1 Objects and Properties Alice

2 Objects in Alice Objects already exist. Hundreds of them

3 Objects In the demo worlds, the octopus and skater are objects. An "object" is anything that can be identified as unique from other things How is an object identified as unique? has a name has properties: width, height, color, location, age, ss#, id# has a purpose: associated actions it can perform tasks it can carry out

4 Objects in a Virtual World In Alice, each 3D model is a class of objects each object of the class has a unique name mummy, mummy1, mummy2 has color(s) pink, white, grey, black, blue, ….

5 Objects in the World Can have multiple instances of objects from the same class in the World class: like a cookie cutter objects: like the cookies star cookie cutter star cookie class star cookies star cookie objects

6 Objects in the World penguin classpenguin objects in a virtual world

7 Object Dimensions Objects in Alice worlds are 3 dimensional height width depth

8 Objects “Know” Relative Directions Yellow box around penguin is its bounding box light blue line is up/down pink line is left/right dark blue line is forward backward DEMO

9 Galleries of 3D Objects Sources of 3D objects the local gallery shipped with the software Alice web gallery

10 Objects in a Virtual World In Alice, each 3D model is a class of objects class: penguin objects: penguin, penguin2, penguin3

11 Problem Suppose I want a Penguin to disappear from the screen during the animation.

12 Solution The solution is to change the opacity (degree of transparency) while the animation is running. Opacity is a property of the penguin object. All objects in Alice have properties, which include (among others): location (x, y, z) orientation color opacity vehicle

13 Changing Properties of Obejcts Properties of Object can be changed Location can be changed by clicking and moving object Orientation can be changed in the “Add Objects” View Other properties, such as color, can be changed in the properties window when the object is selected

14 Object Parts Objects may be composed of parts which may in turn be composed of parts the whole object may be told to do something or an individual part

15 Object Parts Objects may be composed of parts

16 3D objects A 3D object has 3 dimensions height, width, depth 6 degrees of freedom (directions of movement)

17 Distance object’s distance from each other are based on the distance between their center points may look like objects are zero distance away, but actually centers still some positive distance away

18 Position in the World The world in an Alice program models a 3D space every object in the world has a position x, y, z, coordinate relative to the center of the world ground starts at center of world axes (green = up, red = right, blue = forward)

19 Vehicles Each object has a vehicle property Initially the world is the vehicle for objects can change this by altering the vehicle property for an object Give the snowman an instrument Change “ahem” to “toot” What happens when movie played?

20 Alter the Vehicle Property Select sax from object tree Select properties tab Change vehicle from world to snowman

21 Assignment Read Tutorial03 Know what an object is instance of Know how to use the properties Read Tips & Techniques 2 Orientation and Movement Instructions

22 Lab 03 Penguin Tortoise and the cookie Mana and the magnet


Download ppt "Objects and Properties Alice. Objects in Alice Objects already exist. Hundreds of them."

Similar presentations


Ads by Google