email me at borlaj@portlandschools.org
notes previous (09/07/06) submit the dump links  
 

SUBMIT HWS HERE

 

Alice HWs

 

You must do 2 of each section (so 2 from 2-1,2-2,2-3).

 

1-1. Island - create the following seen using (island (environment) and fish (animal)

f
1-2. Winter
Add two snowmen (People gallery folder) to a snowy scene. Use a snow template initial world. Then, create a snowman stack by using the scene editor's quad view to position one snowman on top of the other (vertically), as shown below.

f
1-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:

f


2-1. Snowpeople

Create a snow people world as shown the scene below. Several snow people are out­doors on a snow-covered landscape.

 

A snowman is trying to meet a snowwoman who is talking with a friend (another snow­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 blush­es (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 disappoint­ment and turns away.

2-2. Circling Fish

Create an island world with a fish in the water. (You may wish to reuse the island world created in an exercise for Chapter 1.) Position the fish and the camera point of view so the scene appears as illustrated below. Write a program that has the fish swim around in a circle in front of the island. Next, have the fish swim around the island. You may wish to have the fish move asSeenBy the island (asSeenBy is described in Tips & Techniques 2). Finally, have the fish jump out of the water and then dive down into the water. The final scene should look somewhat like the initial scene, with the fish back in roughly the same position as where it started.

 

"

2-3. Tortoise Gets a Cookie

Create a world having a tortoise (Animals), a stool (Kitchen [it looks a bit different]), and a cookie (KitchenIFood), as shown below. Put the cookie on top ofthe stool. (Cook­ies are the tortoise's favorite snack food.) Position the tortoise and the stool side by side and then use a move method to move the tortoise 2 meters away from the stool. (This way, you know exactly how far the tortoise is from the stool.) Use a turn to face method to be sure the tortoise is facing the stool. Write a program to move the tortoise to the stool to get the cookie. Have the tortoise show its thanks (for the cookie) by looking at the camera and waving an arm.

 


3-1. Dog to Fire Hydrant

Create a world with a dog (wolf from Animals) and a fire hydrant (City), as shown in the scene below. (We used a wolf as a dog.) Write an instruction that puts together a distance to function and a math expression to move the dog to the fire hydrant. The dog should stop short of colliding with the hydrant. YOU MUST USE the function distance to

 

3-2. Hop

Create a world with a crate (Objects) and a kangaroo (Animals). Write a program to make the kangaroo hop to the top ofthe box, turning the kangaroo's legs backward and forward to make it look like a hop. Use the height function to guide the forward and up­ward movements. YOU MUST USE the function height

 

 

3-4. Snowman to Stool

This exercise create a world with a snow­man and a stool, as seen below. Use a Loop to make the snowman (People) move to the stool (Kitchen) in exactly 3 jumps. Use a distance to function to the distance, you of course will need to use some math functions. We recommend that you test your solution by moving the snowman and the stool to different locations on the screen and running the program with each change, so you can whether it works no matter where the snowman and the stool are located. YOU MUST USE the function distance to

 


4-1. Confused Kanga

Scrounging for breakfast on the outback, Kanga (kangaroo from Animals) encounters a rather confusing sign (Roads and Signs folder). Kanga stares at the sign for a few sec­onds and tilts her head sideways to show that she is confused. Kanga then hops left and turns toward the sign and then hops right and turns toward the sign and then left and then right.

 

Create a simulation that implements this comical story. Write methods hopLeft (Kanga turns left a small amount and hops, and then turns to face the sign) and hopRight (Kanga turns right a small amount and hops, then turns to face the sign). With each hop, Kanga should make some progress toward the sign. In World. my first method, alternately call the hopLeft and hopRight methods (twice) to make Kanga take a zigzag path toward the sign. YOU NEED TO HAVE 2 METHODS - hopLeft and hopRight

 

 

4-3. Magic Act

A magician is performing a levitation illusion, in which objects seem to rise magicallj into the air. The magician (People) points a magic wand (Objects) at his assistant (Gir from People folder), and she gently rises into the air and then floats back down to hel original position on the table (Furniture on CD or Web gallery). Then the magician per­forms the same trick with the rabbit (Animals). The rabbit, being a lighter object, float! up higher than the magician's assistant. Because the magician's assistant and rabbit ,Off 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). YOU NEED TO HAVE 1 METHOD - levitate that has 2 parameters (the object levitating and how high it levitates)

 

;

Hint: The magician's assistant is reclining on the surface of the table. A move up instruction will cause the assistant to move upward from her point of view, as shown below. Use the asSeenBy argument to make the magician's assistant move upward as seen by the ground.

 

 

   

4-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 his hand upward with the appropriate hand), kickLeft and kickRight (where he kicks with the ap­propriate leg), and leftSpin and rightSpin (where he does a spin in the appropriate direc­tion). Each method must contain more than one instruction. For example, in the kickLeft method, the left 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 trainedNin­ja objects practice their moves, facing one another. YOU NEED TO HAVE 4 METHODS

 

 

 

4-5. Flight Simulator Completion

(a)      Create a world for a plane simulation.  Create the methods flyForward,barrel (roll around), flyLeft, flyRight, forwardLoop

(b) Implement the flyForward event when the user hits up.

(c) Add barrel event when the user hits space.

(d)  Add flyLeft andflyRight event handling methods for the left and right arrow keys to steer the biplane left or right.

(e)      Add a forwardLoop stunt that works when the user presses the Enter key.

Required - the 5 methods above


 

5-2. Typing Tutor

Learning to type rapidly (without looking at the keyboard) is a skill requiring much practice. In this exercise, you are to create a typing tutor that encourages the begin­ning typist to type a specific set of letters. Use 3D text letters (3D Text folder) to cre­ate a word in the world, (for example, you could create the word ALICE with the letters A, L, I, C, and E) and create one method for all letters that spins the letter two times (so it will take in a parameter). When the user types a letter key on the keyboard that matches the letter on the screen, the letter on the screen should perform its spin method. Also include an ad­ditional method, spinWord, which spins all the letters when the user presses the spacebar. NOTE EACH LETTER WILL BE ITS OWN OBJECT

Requirements: 2 methods: spinLetter (taking in the letter as an object parameter) , spinWord

 

Hint: Use asSeenBy to spin the word.

 

 

 

 

5-3. Snow Festival

Your team has created a snowman as the centerpiece of an entry in the Winter Snow Festival competition. To attract attraction to your display, you have set up colored spot­lights that will turn the color of the snowman anyone of four different colors. Create an initial world with four spotlights (spheres from the Shapes folder, of four different col­ors) and a snowman, as shown below. Write only one method to change the color of the snowman. When the user clicks on a spotlight pass the color of the spotlight to the method and make the snowman change to be that color.

 

Requirements: 1 method: changeSnowman (taking in the color as a parameter)

 

5-4. Flowerbox

It's spring and you are anxiously waiting for flowers to grow. You decide to give them little help. Create an initial scene of a flowerbox (Box from Shapes, change color to red) with five flowers (of your choosing) in it. (D se instructions in the initial scene to move the flowers down out of sight.)

 

Write one method to grow a flower in the box (move the flower up into view). The flower that grows in the box depends, on which key the user presses , if the user presses "s" key, the sunflower will grow but if the user presses the "D"key, the daisy will grow. To grow the flowers, create a "When <key> is typed" event for each key selected to represent a specific flower. Link the key-press event to the growFlower event handling method, using the particular flower represented by that key as its parameter. When all the flowers are grown, the flowerbox will look something like the following:

Requirements: 1 method: growFlower (taking in the flower as an object parameter)

 

5-5. Penguin Slide

A favorite activity of penguins in the local zoo is to slide down an icy slope into a pool of water in the pond. Create a world with a lake scene (Environments) and three penguins (Animals) on the slope, as shown below. Make the program event-driven.  Allow the user to click on the next penguin to slide down the slope into the pool of water. Each penguin slides on its belly and spins around as it slides. Each penguin should spins some number of times. When the penguin reaches the pond, move the penguin down 5 rneters so it disappears below the water. Write only one event handling method. When the penguin is mouse-clicked, pass the penguin object that was clicked and the number of times the penguin is to spin around as it slides down the slope.    

Requirements: 1 method: slide (taking in the penguin as an object parameter, and spins asd a number parameter)

.


 

6-1. Lightbulb

Create a world with a lightbulb (Lights) and a method turnOnOffthat turns the lig on/off depending on whether it is already on/off. When the lightbulb is on, its e'1

color property has a value of yellow. When the lightbulb is off, its emissive cq black. Write a variable isLightOn that is true if the light bulb is d

       false if it is off. When clicked, the lightbulb should turn on/off.                                                I

 

I

 

 


Extra Credit

 

Do any / all from here