Professional Documents
Culture Documents
Learning Alice
Learning Alice
Learning Alice
1. Island
Create an island scene. Start by choosing a water world template. Add an
island object (from the Environments gallery folder). Use the scene editor to
position the island a bit to the right of the center of the scene. Now, add a fish
(from the Ocean gallery) to the scene. You may find that the fish is invisible
because it is located behind the island or is not properly positioned. Use the
scene editor and its quad view to arrange the fish so it looks like it is
swimming in the water to the left of the island. Use the camera controls to
zoom out so the island and the fish are both in the camera’s view.
3. Snowpeople Pile
Build a “wall” of four snowpeople by tipping them over on their sides and
piling them on top of one another. (Use methods, mouse controls, and quad
view.) Four snowpeople (alternating between snowman and snowwoman)
might be used to produce a wall that looks like this:
4. Tea Party
As a tribute to Lewis Carroll, create a Tea Party for Alice Lidell and the
white rabbit. In addition to AliceLiddell (People) and the whiteRabbit
(Animals), the party should include a table (Dining Table in Furniture folder)
and three chairs (Furniture), a teapot, a toaster, and a plate (Kitchen). Use
method instructions, the mouse, and quad view to properly position objects
Right-click on each soldier and use methods (from the popup menu) to rotate
the arms of the soldiers to salute each other. Or, use the mouse controls in the
scene editor to rotate the arms into position. (Use the “affect subparts”
checkbox to allow the mouse to rotate their arms.) Raise the left arm of each
soldier (at about a 45-degree angle with the horizontal plane). The result
should be a scene where all four soldiers are saluting. This is not an
animation –– all you are trying to do is set up the scene.
Hint: If you check the “affect subparts” checkbox to allow the mouse to
rotate subparts of an object, remember to uncheck the box before using the
mouse for some other purpose.
2. Snowpeople
Create a snow people world as shown in the scene below. Several snow
people are outdoors on a snow-covered landscape. A snowman is trying to
meet a snowwoman who is talking with a friend (another woman). The
snowman tries to get her attention. He turns to face the snowwoman and says
“Ahem”. She turns to look at the snowman and he blinks his eyes at her. She
blushes (her head turns red). But, alas, she is not interested in meeting him.
She gives him a “cold shoulder” and turns back to talk with her friend. He
hangs his head in disappointment and turns away.
Hints: (1) use the vehicle property to make the magnet move in coordination
with Mana’s hand, and (2) use the move toward instruction to make an object
move toward another object. Also, you may wish to review the notion of
center.
1. SpiderRobot’s Walk
In Session 8 of the course program code was presented to make the
spiderRobot walk forward repeatedly in a loop. Recreate the program code
and test the Loop statement with a count of 2, 4 and 5. Which count works
best? Why?
3. Snowman to Stool
This exercise uses a number function as the count for a Loop. Create a world
with a snowman and a stool, as seen below. Use a Loop to make the
snowman (People) move to the stool (Kitchen), one meter at a time. Use a
distance to function to determine the number of times the loop repeats. (The
distance to function might return a fractional distance such as 3.75 meters.
The Loop statement truncates the factional number to the integer 3 and will
repeat three times.) We recommend that you test your solution by moving the
snowman and stool to different locations on the screen and running the
program with each change, so you know whether it works no matter where
the snowman and stool are located initially.
2. Confused Kanga
Scrounging for breakfast in the outback, Kanga (kangaroo from Animals)
encounters a rather confusing sign (Roads and Signs folder). Kanga stares at
the sign for a few seconds and tilts her head sideways to show that she is
Write two world-level methods, one named gallop (horse and rider gallop
forward one step) and another named jump (horse and rider jump the fence).
In the gallop method, the horse’s front legs should lift and then go down as
the back legs lift and the horse moves forward. Then the back legs should go
back down. The jump method should be similar, but the horse should move
4. Helicopter Flight
Create a world with a helicopter (Vehicles), airport (Buildings) and a control
tower (Buildings). Create a circleTower method that makes the helicopter fly
toward the control tower and then move around it. In World.my first method,
call the circleTower method twice
2. Frog Escape
At the local lily pond (Environments in the Web gallery), the frogs (Animals)
enjoy climbing out of the water now and then to warm up in the sun. Of
3. Magic Act
A magician is performing a levitation illusion, in which objects seem to rise
magically into the air. The Magician (People) points a magic wand (Objects)
at his assistant (Girl from the People folder), and she gently rises into the air
and then floats back down to her original position on the magician’s table
(Furniture). Then the magician performs the same trick with the rabbit
(Animals). The rabbit, being a lighter object, floats up higher than the
magician’s assistant. Because the magician’s assistant and rabbit are each to
levitate in the same way, use a single method and use parameters to
communicate which object is to float and the distance the object is to move
upward (and back down).
4. Dragons
Legend has it that dragons are distant relatives of chickens. We are not
surprised, then, that a favourite pastime of dragons was a game of “chicken”.
The scene below shows a world with four dragons (Medieval) carefully
placed in a diamond like pattern. Create a simulation of a game of chicken
where any two dragons face each other and fly upward to a slightly different
height above the ground. Then the dragons fly toward each other, nearly
missing one another. Each dragon should land in the position where the other
dragon was located. That is, the two dragons trade places. Your simulation
should use a method named dragonFlight that has four dragons –– the two
dragons that will face off in a game of chicken and the height for each
dragon’s flight.
1. Enhanced cleverSkater
Create a better skater than the one presented in Session 12 of the course. In
addition to skateForward, spin and skateAround methods, create
skateBackward and jump class-level methods. In skateBackward, the skater
should perform similar actions to those in the skateForward method, but
slide backward instead of forward. In a jump method, the skater should move
forward, lift one leg, then move upwards (in the air) and back down to land
gracefully on the ice and lower her leg back to its starting position. Save your
enhanced skater as EnhancedCleverSkater.
Test your newly defined class by starting a new world with a frozen lake.
Add an enhancedCleverSkater to the world. Also, add a penguin and a duck.
• Call each of the methods you have written
• Then call the skateAround method –– to make the skater skate
around the penguin and then the duck. (This will require two calls
to the skateAround method.)
2. Lock Combination
Create a world with a comboLock (Objects folder). Create four class-level
methods –– leftOne, rightOne, leftRevolution, and rightRevolution –– that
turn the dial 1 number left, 1 number right, 1 revolution left, and 1 revolution
right, respectively. Then, create a class-level method named open that opens
and another named close that closes the lock.
Hint: One position on the dial is actually 1/40 of a revolution. (Use the
endGently style to make the motion more realistic.) Rename comboLock as
TurningComboLock and save it as a new class.
4. Ninja Practice
Create a world with an evilNinja (People) and write class methods for
traditional Ninja moves. For example, you can write rightJab and leftJab
(where the Ninja jabs the appropriate hand upward), kickLeft and kickRight
(where he kicks with the appropriate leg), and leftSpin and rightSpin (where
he does a spin in the appropriate direction). Each method must contain more
than one instruction. For example, in the kickLeft method, the lower leg
should turn and the foot twist at the same time as the entire leg kicks out to
the left. Save the Ninja as a new class named TrainedNinja. Start a new
world and add two trainedNinja objects. Create an animation where the two
trainedNinja objects practice their moves, facing one another.