Lab 1 Part 3

advertisement
Lab 1 Part 3
Assigned: 1/12/15
Due: 1/14/15
Problem:
Two fish are discussing their fear of sharks. There is a cave with a lantern on it, a sunken pirate
ship, a treasure chest and various underwater items nearby. Suddenly, a shark appears out of the
shadows. One fish swims to the cave and hides in it while the second fish swims to the treasure
chest. He swims one lap around the treasure chest and the lid opens. The fish swims into the chest
and then the lid closes.
Algorithm:
Do in order
1st fish says “I hope that I never see a shark!”
2nd fish says “Why?”
1st fish says “I am afraid of sharks. They like to eat little fish like
me.”
Shark appears out of shadows.
1st fish swims to cave, says “good bye” then swims into cave.
2nd fish says “Look at the school of fish by the pirate ship.”
Shark turns towards pirate ship.
2nd fish swims to treasure chest, swims one lap around the chest.
The lid opens, the fish swims into the chest and the lid closes.
Alice turns to face the white rabbit
Alice
moves
forward
Start a new project
similar
to Part
2. 4 meters
Alice says "Hello, Rabbit." (play audio optional )
Rabbit
Alice.
You on
aretop
late."
optional)
Create an underwater
scenesays
with"Hello,
a cave and
lantern
of it(play
(sameaudio
as earlier
lab), a sunken pirate ship, a
Do
together
treasure chest and some additional underwater items. Add in two fish with a shark 70 meters behind the
Alice look
turnssomething
to face the
fish. The initial scene should
likecamera
this (your scene may have different environment objects,
Rabbit
turns
to
face
the camera
but must have the objects listed above):
Alice says "Hello, world!" (play audio optional)
HINT: When setting up the initial scene, it might be easier if you start with the shark with the fish and then
use “one shots” to move the shark back.
HINT: Try using the “Get Distance To” Function to determine the distances from the fish to the cave and
the fish to the reassure chest:
Assignment (to be completed on your own, due January 14, 2015
Problem: Two fish have been swimming near an underwater cave when a shark swims close to their
location and the two fish are in danger of being on the shark’s menu for lunch. Create an animation
where the two fish avoid the shark by swimming into a cave and a Treasure Chest
1. Create an initial scene, similar to the screen-grab above. The objects in the scene are from the Gallery
Swimmer/Fish package (blueTang fish, clown fish, and shark), the Transportation package (pirate ship)
and the Prop package (cave, lantern, treasure chest). The fish are an unknown distance in front of the
entrance to the cave and the shark is 70 meters behind the scene (as seen by the camera). The lantern is
sitting on top of the cave, leaning against the rocks.
2. Create the program code to animate the fish swimming to hide. Be sure to include comments in your
program.
3.Save as Lab1.3-FishEscape
Turn in your assignment
Download