You are on page 1of 17

MAULIDYA YUNANDA

TI 3A
4617010051

Practice 2-2
1. Position an object using a one-shot procedure.
a. Move the rabbit 2 meters to the left using a one-shot procedure.
2. Add multiple objects to a scene.
a. Add a castle wall and a hedge to the scene.
b. Make sure the objects are not all located in the center of the scene. (HINT: use a
one-shot procedure to move an object.)
3. Position objects using the drag-and-drop method.
a. Position the castle wall so that it is on the far left of the scene using drag and
drop.
b. Rotate the castle wall so that position is angled behind the white rabbit and the
face of the wall is fully visible.

4. Position objects using coordinates.


a. Position the White Rabbit so that it is at the following coordinates: x=-1, y=0,
z=1
5. Change the properties of an object.
a. Change the size of the hedge to 1.0 meter in height.

6. Position sub-parts of an object.


a. Position the White Rabbit's arms and hands so that they are in a more natural
position.
Practice 2-3
1. Program an object to move.
a. Program the White Rabbit to move 1 meter to the right and then 1 meter to the
left.

2. Edit arguments in a procedure.


a. Edit the arguments in the move procedures so that the White Rabbit moves 1
meter to the right and then .25 meters to the left
3. Reorder, copy, edit and delete programming statements.
a. Reorder the "Move" programming statements so that the White Rabbit moves left
1 meter, and then moves right 1 meter.
b. Copy and edit programming statements so that the White Rabbit then moves right
0.5 meters and then left 2 meters, and then right 1 meter.
c. Delete a programming statement so that the White Rabbit no longer says "hello".

4. Test and debug the program.


a. Test, edit, and debug the program so that the White Rabbit pauses for 1 second
before speaking (use delay) and moves more gently.
5. Disable a programming statement.
a. Disable the "Say" programming statement so that the Rabbit does not say "Have
Fun".
b. Run the program to test that the disabled statement does not animate.
6. Add programming comments.
a. Add programming comments to each segment of programming code.
Practice 2-4
1. Program an object to rotate.
a. Program the White Rabbit to do one complete spin to the left.

2. Create a control statement.


a. Program both of the White Rabbit's ears to wiggle at the same time.
3. Program an object’s sub-part to rotate.
a. Program the White Rabbit's right foot to move up and down.

4. Randomize object movement.


a. Make White Rabbit's ears wiggle a random number of times equal to an integer
between and including 1 and 3.
Practice 2-5
1. Define a scenario.
a. Write a brief scenario for a White Rabbit turning, hopping forward three times,
and a baby bunny following the White Rabbit.
2. Plan an animation with a storyboard.
a. Write a textual storyboard for a scenario where a White Rabbit turns, hops three
times, and then a baby bunny follows him with two hops.
3. View inherited characteristics.
Using the class hierarchy drop-down menu, view the inherited characteristics for the
White Rabbit.

4. Declare a procedure.
a. Declare a "bipedHop" procedure for all bipeds. Have the procedure make the
biped hop 0.25 meters in the air and 0.5 meters forward, and return to the ground.
Add the new procedure to myFirstMethod before coding.
5. Add a declared procedure.
a. Have the White Rabbit turn and take three hops using a declared procedure. If the
rabbit collides with any of the scenery objects rearrange them to avoid collisions.
6. Access and edit a declared procedure.
a. Revise the bipedHop procedure so that the hop begins and ends gently and so the
duration for each hop is a total of .5 seconds.
7. Use inherited procedures.
a. Add a bunny to the scene next to the white rabbit. Have the bunny follow the
white rabbit with 2 hops.

You might also like