Non-Rigid BallWorld Exercises
 
 
(1) Using the ball expression from lesson 5, redesign BallWorld to run without rigid bodies. In other words, create new insides for the following two global procedures:
 
global proc createBallWorld( float $w, float $h, float $d, float $r, float $g, float $b )
 
global proc createBall(float $x, float $y, float $z, float $radius, float $vx, float $vy, float $vz, float $r, float $g, float $b )
 
Don't add or remove any arguments in their argument lists. Afterwards, the procedure makeBallWorld() without modification should be able to run using these procedures.
 
Test them using the programs that you wrote in lab 4. See how close you can get them to match.
 
 
(2) Add "float $s" to the "createBall" argument list. "float $s" should scale x, y, z equally. Write a new makeBallWorld() that calls the above procedures and generates at least 20 balls bouncing in an interesting colorful pattern. Try to use loops to generate the 20 (or more) balls. The colors should be ramped. Render it and turn in a quicktime of the work.
 
(3) Modify ballWorld to become shapeWorld so that the 20 balls change shape dynamically while running. Start with balls and end with cones or cubes. Again, render it and turn in a quicktime of the work. Color should remain the same so we can track each shape. It would be fine if the second shape pops on randomly during the run. It would be challenging if a transformation occurs from one to the other. The transformation is optional.
 
(4) Modify ballWorld to become colorWorld so that the 20 balls change color dynamically while running. Whatever color the ball starts out as, it should become it's complement when it ends. You may want to investigate using a MEL command which converts HSV to RGB. Again, render it and turn in a quicktime of the work.
 

Please deposit your text files along with quicktimes into the class folder in mycourses.rit.edu.

Thank you.