Mathematical Visualization WS08 Technical University Berlin

Assignment 3

Theme: Rigid Body Motion

Part 1. The Example

  • Begin by updating your eclipse state, starting with jreality and then with our MathVisWS08 project.
  • You should see three new classes:
    • Sample02RigidBodyMotion This is the main class
    • InertialRotateShapeTool A modified rotate tool which implements realistic rigid body rotation
    • RigidBodySimulator This mostly mathematical class handles the model and creates a representation
  • Run the Sample02RigidBodyMotion as a Java application. Follow the instructions on the "ReadMe" tab.
  • Notice that the angular momentum vector stays fixed in space, as it should!
  • To understand what's happening, look at the code. You should see that the actual numerical mathematics is being carried out by two classes:
    • ODE which contains a description of the second order ODE underlying the motion, and
    • Extrap a DE solver
    • Some documentation on both of these classes can be found at under the numericalMethods package.
  • Notice that the description of the differential equation in the ODE instance uses quaternions. If you don't understand what's going on here, download this assignment sheet problem 2, "Quaternions". This shows how quaternions can be used to represent three dimensional euclidean rotations.

Part 2. Assignment

Your assignment, due in two weeks (at 14:00 Uhr Wednesday November 19) is to modify Sample02RigidBodyMotion in an interesting way. Here are some options:

  • Implement the sliders in the inspector to control the three dimensions of the box and update these in real time.
  • Trace the path of the tip of the angular velocity vector in body coordinates; this should be a path on the surface of the inertial ellipsoid.
  • Draw the fixed plane in space on which the ellipsoid rolls, and trace the path of the contact point (in world coordinates) there.
  • Apply external forces, called torques. To do this, change ODE.eval() in the last three entries (corresponding to the Euler equations w' = a x w + f).
  • Add sound effects (realistics or just theoretical).
  • Research how the moments of inertia are calculated for other shapes (cylinders, plates, shells) in a standard mechanics textbook and implement other shapes besides the rectangular box shown here.
  • Replace the quaternion integration method used in the ODE instance with the more traditional approach using 3x3 matrices. Why do you think the quaternion method is preferred?
  • Once you've finished your work, check it into the svn repository as directed above. Be sure that you've documented the changes that you've made to the original, or if you've written your own system, document how you've done it.
  • Remember, check in your work by 14:00 Uhr (punkt!) on 019.11.08.
  • Due to an illness in the family, I may not be in the university for the next two weeks.