Last edited 12/2/2013 by Kevin Doherty

Punching Man: Animated Workout Man Performing a Reverse Punch (2013)

Project Overview

For my project, I will borrow code from previous students' work and adapt it to create an animation of a man performing a reverse punch. This will include the man twisting his hips, extending his arm, and rotating his fist. Depending on the time taken to complete the previously stated features, I will also attempt to add a variable speed editor, a restart button, and images of real fists that are mapped onto the spheres currently representing fists.


     Step 1

       I started off with the code from Workout Man. I first turned off the animation to make the RTICA easier to work with and examine the new starting position. I then rotated each body part to its proper starting position, starting with the hips and shoulders and basing each subsequent limb segment on the previous frame. Refer to the attached math seminar below to see the angles and axes of rotation. The steps for rotation are as follows:
  1. Rotate the hips and shoulders in the same manner.
  2. Rotate the upper right arm with respect to the right shoulder.
  3. Rotate the lower right arm with respect to the upper right arm.
  4. Rotate the upper left arm with respect to the left shoulder.
  5. Rotate the lower left arm with respect to the upper left arm.
Original RTICA:

After Step 1:

     Step 2

       I then positioned the legs, which were slightly more difficult because the angles were not as nice and they required rotations about multiple axes at times. I followed the same steps as repositioning the arms, building off of the frame for the hips, first repositioning the upper leg and then the lower leg with respect to the upper leg. After this step, I had the complete starting position set.

Complete Starting Position:

     Step 3

       This step involves all the rotations. I first rotated the central piece, the torso (which includes the hips and shoulders). I then rotated upper limbs in relation to the first rotation, then lower limbs in relation to the second rotation. The flowchart shown below (and also attached at the bottom) provides more detail on the rotation process.

Here is an image of the Punching Man rotated into his final position:

Order of Rotation Changes:

     Step 4

       In this step, I focused on adding visual components to my RTICA. This included changing the background color and the color of the man's body to represent that of a karate uniform (white with a black belt).

Here is what the final details look like:

     Step 5

       In Step 5, I added a control window that included a slider to adjust the speed of the punch. The slider increases the speed as it is moved to the right. The speed can be adjusted before the punch is started or while the punch is in progress.

Image of the Speed Slider:

     Step 6

       I then added a button labelled "Punch" to start the punch. The program no longer starts upon opening, but rather requires this button to be pressed first. This also allows the punch to be repeated. To add this button, I had to make the rotation a function and have the button activate the function.

Image of the Start Button:

     Step 7

       The finishing touch was adding pictures of fists onto the fists themselves. I first had to convert a .jpg of a fist I found online to a file readable by python, .tga. I then mapped it onto the spherical fists I had created. Finally, I had to orient them into the proper starting position by rotating the frames the fists were in before any rotations occurred.

Fists with Mapped Images:


  1. Understanding the Biomechanics of the Reverse Punch:   Math Seminar
  2. Full Proposal
  3. Flow Chart