Presentation is loading. Please wait.

Presentation is loading. Please wait.

Motion and Rotation. 3 Dimensional Space  An Alice object o Is located in a 3D world, positioned at (x, y, z) o has 3 dimensions o height, width, depth.

Similar presentations


Presentation on theme: "Motion and Rotation. 3 Dimensional Space  An Alice object o Is located in a 3D world, positioned at (x, y, z) o has 3 dimensions o height, width, depth."— Presentation transcript:

1 Motion and Rotation

2 3 Dimensional Space  An Alice object o Is located in a 3D world, positioned at (x, y, z) o has 3 dimensions o height, width, depth o can move in 6 directions up right forward down left back

3  An object’s center is its pivot point (around which it moves and rotates).  The center of an object is usually where it stands on the ground Center center

4 Where an object “is”  One way to describe where an object “is” Position --relative to the ground’s origin (x,y,z) (19, 15, -20) (0, 0, 0) Center of the world (origin)

5 Where an object “is”  A second way to describe where an object “is” Orientation -- an object’s sense of its own forward and up directions Up Forward

6  Translational motion changes the location of an object in the world  The direction of translational motion is stated relative to the orientation of the object. ◦ Six possible directions  move  left  right  up  down  forward  backward forward right up back Copyright 2012 Wanda Dann, Don Slater All rights reserved

7 Example: Move forward Move forward – object’s new position is now “in front of” its previous position (relative to the object’s own sense of forward). The object’s position (x,y,z)-coordinate has changed. It’s sense of “up” has not changed.

8  Rotational motion changes the orientation of an object in the world  There is no change of position of the object  An object’s center acts as its pivot point for rotation.  Two forms of rotational motion:  turn  forward, backward  left, right  roll  left, right Copyright 2012 Wanda Dann, Don Slater All rights reserved

9 Example: Roll Right Roll right – object’s new position is now rotated to the right of its original position (relative to the object’s own sense of right). The object’s location (x,y,z)-coordinate has not changed. It’s sense of “up” has changed but its sense of forward has stayed the same.

10 Example: Turn right Turn right – object’s forward direction has changed but it’s sense of up is still the same. The object’s position (x,y,z)-coordinate has not changed.

11 Let’s try it Create a new Alice world  Use the Sea Floor template  Add an instance of the DesertTortoise class (in the Quadruped folder)

12 Handles

13 Allows Left/Right and Forward/Backward movement

14 Allows Forward/Backward and Left/Right turn and Left/Right roll

15 Allows Up/Down, Left/Right and Forward/Backward movement

16 Allows you to increase or decrease the size of the object

17 Mouse and Keyboard controls Use mouse to drag object left ↔ right or forward ↔ backward Hold shift key and drag for up ↔down Hold ctrl key (option key, Mac) for rotation

18 Joint Motion

19  Objects often (not always) have internal joints that can be animated to control subparts of the model.  A joint connects a subpart of the body to the rest of the body  A joint can be turned or rolled but cannot be moved Internal Joints

20 Biped X-ray

21 Quadruped X-ray

22  A subpart may be connected to another subpart  Rotating one subpart may also rotate other subparts  Examples:  Turning the left shoulder joint will also turn the entire arm of the alien, including the forearm, wrist, hand, fingers, etc.  Turning the left elbow joint will also turn the alien’s forearm, wrist, hand, fingers, etc. Subpart Location Connected subparts

23 Orientation: whole vs. part The orientation of a subpart is not necessarily the same as the orientation of the whole object.

24  A subpart cannot be moved  A move would detach the joint (and its connected subpart) from rest of the model, so a move action is NOT allowed for a subpart of an object. Translational Motion: Joints

25  A subpart’s joint acts as its pivot point for rotation of the subpart.  Two kinds of rotational motion:  turn  forward, backward  left, right  roll  left, right Rotational Motion: Joint/Subpart

26 Rotation of a joint

27 Turn forward/backward Red Handle: Turns joint forward and backward

28 Turn left/right Green Handle: Turns joint left and right

29 Roll left/right Blue Handle: Rolls joint left and right

30  To access a joint, click on the arrow next to the object’s name in the object list. In the Code Editor

31 Look at the DesertTortoise’s subparts Select the FrontRightKnee

32 You can know move that subpart Play around a little

33 One Shots

34 Remember you have an Undo button!

35 Now you have time to play Create a world Add some objects Move them around Resize them Try moving subparts


Download ppt "Motion and Rotation. 3 Dimensional Space  An Alice object o Is located in a 3D world, positioned at (x, y, z) o has 3 dimensions o height, width, depth."

Similar presentations


Ads by Google