Learn to Program Step-by-Step

Active Learning: An Exercise Class

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. 
All objects (other than props) should be instances of classes belonging to the Biped class hierarchy.

Here is an .mp4 file so you can see an example of what you should create.

  1.  Create a procedure for a jumping jack and a procedure for a knee bend for the Biped class.
  2.  Write a program that have the objects 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.

Save the Alice3 project as lastName_firstName_exercise.a3p. For example mary_smith_exercise.a3p

  1. Create an mp4 of the movie to post in this weeks discussion.
  2. Submit the lastName_firstName_exercise.a3p file.


  • In the code there is a comment with your name and a description of the program. Each procedure has a comment. (1 point)
  • You have at least 5 characters that are all bipeds. (They do not have to be the same ones shown here.) (1 point)
  • You have procedures for the jumping jack (2 points) and the knee bend. (2 points) The procedures return to the starting position.
  • The procedures use parameters so that some of the characters move more than others. (2 points)
  • My First method does not have much code except to call the other procedures. (1 points)
  • The movie uses control structures to create a movie similar to the example. (1 point)
  • Create an mp4 for the discussion.
  • Save the program as lastName_firstName_exercise.a3p to submit.

Active Learning Index

Like us on Facebook:

OER: Open Educational Resource
Creative Commons License Author: Janet E. Joy; Publisher: Zebra0.com
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Creative Commons Attribution-NonCommercial 4.0 International License
Last modified: May 25 2017 15:42:31.