Exercise Class
You should complete the lesson Procedures in Alice 3 before doing this assignment.
The fantasy characters in Grimm stories want to change their public image (which is slovenly, overweight, and aggressive).
They want to become more physically fit and friendly characters.
With this in mind, the Grimm community has joined together for a group exercise session.
Create a world with a scene similar to the one shown below. If you wish, you may use characters from your final project.
All objects (other than props) should be instances of classes belonging to the Biped class hierarchy.
I have given you an .mp4 file so you can see an example of what I'm looking for.
- Create a procedure for a jumping jack and a procedure for a knee bend for the Biped class.
- Write a program that have the bipeds each perform a jumping jack (one after the other) and then perform a knee bend (all at the same time.)
The procedure for a knee bend is a bit more complicated than you might expect. This is because a knee bend is actually a combination of bending both knees and lifting both arms upward (for balance).
In this example, the numbers specifying the amount of rotation for the joints is arbitrary.
You may wish to experiment with other amounts to obtain a more realistic animation of a knee bend, although these amounts work fairly well.
This procedure has two basic parts – one part to bend the knees and one part to straighten up. You can take advantage of this in creating the code. Create the first do together code block for the downward knee bend and then hold down the ctrl key (alt on Mac) to drag a copy below to make the second code block. Then, in the second code block, reverse the motion (for example, change move down to move up) for each statement.
Algorithm for Knee Bend:
Do in order
//bend knees down
Do together
Entire body move down 0.125
Right and left hips turn backward 0.125
Right and left ankles turn forward 0.25
Right and left foot turn backward 0.15
Right shoulder turn left 0.25
Left shoulder turn right 0.25
//return to original position
Do together
Entire body move up 0.125 m
Right and left hips turn forward 0.125
Right and left ankles turn backward 0.25
Right and left foot turn forward 0.15
Right shoulder turn right 0.25
Left shoulder turn left 0.25
You will have to figure out the algorithm for the Jumping Jack.
myFirstMethod:
Create the four scene proceures as shown below. From not on, the code in myFirstMethod will be mostly calls to procedures and comments.
- Create the Alice3 project and save as LastName_FirstName_exercise.a3p. For example Smith_Mary_exercise.a3p
- Create an mp4 of the movie to post in this weeks discussion.
- Submit the LastName_FirstName_exercise.a3p file in assignments.
The following are requirements:
If any of these requirements are not met, the score will be 0.
If the requirements are met, the grade is as follows:
Possible points=50
If you do not receive a perfect score you may resubmit it as long as it is resubmitted within 3 days.
Assignment IndexThis web site, and all pages therein, are the sole property and responsibility of Zebra0.com.
It is not endorsed, sponsored, or provided by or on behalf of Montgomery College.