FHTW Berlin

FB 4
Internationale Media and Computing
MeSoII: Media Software II
Sommersemester 2002


Exercise 9: Interaction and Animation

All right, you've made that little cube whirl around, time to look at interaction and animation! We continue on in the 3D Tutorial at http://java.sun.com/products/java-media/3D/collateral/.

  1. Turn to Chapter 4 in the 3D-Tutorial. Both interaction and animation are specified with Behavior objects. In sections 4.1 and 4.2 you learn about Behavior objects. Can you get the SimpleBehavior to work, making something rotate in response to keyboard input? You will need to have the CreateSceneGraph method implemented at some point.
  2. Skip over WakeUp and have a look at the Behavior Utilities. Play with the KeyNavigatorApp (or the MouseRotateApp if this is all real trivial for you). Change the scheduling bounds for the KeyNavigatorBehavior object to something smaller (e.g., a bounding sphere with a radius of 10), then run the application again. What happens when you move beyond the new bounds? Any ideas how to fix this? You don't have to implement it, just report on possible solution strategies.
  3. The Java 3D API provides a number of classes useful in creating animations without having to create a new class. First read about AlphaWaveforms. Look at the ClockApp.java example. Can you get this to run?
  4. Experiment with the AlphaApp.java example. Is this beginning to make sense? If you have time, try out the InterpolatorApp.java example. The InterpolatorApp example program uses six different interpolator objects. Each of the interpolator objects refers to the same Alpha object. The result is to coordinate all the interpolators. What would be the result if each interpolator object had its own Alpha object? How could you change the timing?
  5. Only if you have time, skip on to section 5.5 and look at morphing. Can you make the stick man walk?

The URL to your report, which will describe what you did during the exercise and include links to your code, is due in my email box by the start of exercise 4. This means Tuesday at 8.00 for Group 1 and Thursday at 12.00 for Group 2. Do not forget to put your names on the report! When you send the URL to me, include your partner in the CC. That way I don't get either 2 emails or none, while each thought the other was doing it. And when I answer you, I can immediately answer both of you without having to look up your preferred email account.


Debora Weber-Wulff (weberwu@fhtw-berlin.de)