Math 217A - Spring 2002 - Assignment #2
due Wednesday, April 17
Goals: Learn the use of hierarchical transformations,
especially translations and rotaions in three dimensions.
Reading: Read through chapter 2 as covered in lectures.
- Download Solar.
Compile the program, and observe how the keyboard controls work (Up arrow and down
arrow control the speed.) Note how the motion of the planet (Earth) is aliased to
that it does not appear to by rotating on its axis. The "true" rotational
movement can be seen by slowing down the simulation sufficiently.
- Read the section from the book on how rotations and translations work to animate the
solar system. This is on pages 47-50 of the draft of the book handed out to the
- Modify the Solar program to include the following new features:
- Give the moon a satellite of its own.
- Add a geostationary moon to the planet Earth.
- Add a new planet (Planet X) and give it a moon with a retrograde orbit.
- Give the Earth and its moons (now two of them) a tilt. The tilt should be in a
fixed direction, always to the right, say. This is similar to the tilt on the actual
Earth which causes the seasons with the North Pole always pointing towards the North Star,
Polaris. Thus, during part of the year the tilt is towards the sun, and during other
parts, the tilt is away from the sun.
- (OPTIONAL). Do assignments e. and/or f. on page 50 of the book draft handed out.
(Typo in draft - thanks to Dan and John for noting it: 356.25 should be 365.25.)
- (OPTIONAL). Make Planet X's orbit noticably elliptical instead of circular.
It orbital speed does NOT need to obey Kepler's laws.
Homework turn-in procedure: Your turned in results should
consist of two parts. First, a report on your work. (1) Talk
in person to me or Frank Chang, demonstrate your code and discuss the assignment. Or
(2), email me and Frank (email@example.com, firstname.lastname@example.org) with a report of what you did.
A plain text report is preferred. For the email option, a long report is not
needed, but you should at least
- Say what parts of the assignments you did,
- Describe any problems or difficulties you encountered, http://
- Describe how you implemented of the Earth and its moons. Include the relevant code
- Describe your optional work, if any.
Second, turn in your code and an executable. Executable
files will be made publicly available, so everyone can have their results demoed to the
rest of the class. You should turn in source files and executable, by using
anonymous ftp to euclid.ucsd.edu, directory pub/sbuss/turnin217/ma217sXX/SolarProg.
Here, replace "ma217sXX" by your own
userid. Make sure the executable file is uploaded in binary mode.
Click here for more detailed