First installment due by the end of Thursday, October 6th, emailed as a jar, as in Assignment #1. The first installment is composed of two portions:
Overview. Our planets are almost perfect spheres. (Our tallest mountains are 5 miles, whereas the earth's radius is 4,000 miles - it's as close to a perfect sphere as a billiard ball.) There is no need to model all our planets, must less their moons or the rings of Saturn. Also, it is not useful, when doing a graphics programming exercise, to try to stay true to the real radii and orbit sizes of the planets, since the orbital radii of the planets are many times greater than the radii of the planets. For example, the earth's radius is about 6,000 km, but its orbital radius, its distance from the sun, is about 150 million km. At the end of this page is a table of basic information about the planets (note that the Sun has 9 moons ;-)
What to do? What you'll do in your assignment, is to create and name four or so 'fake' planets and a 'fake' sun. For example, your sun, at the origin, could have a radius of 50 pixels, and your planets could have radii between 10 and 30 pixels, and orbital radii of no more than 300 pixels. That should fill your display nicely. You might want to add a few small moons - your choice - you get to name them too. Your viewing distances for the scene could vary from infinity (orthographic projection) to, say, 1,000 pixels or even less. Small distances can produce dramatic perspective. Name your planets as you like and give them whatever colors you like. The sun should be bright yellow or some other bright color.
The triangle ray-tracing example: You can build your Planet ray-tracing
assignment code by using portions of my Triangle code.
Here is a link to the triangle code,
including javadoc, a jar file, etc.
(The jar is simple, with just the code.) Here is a brief description
of each class in the triangle example, with indications of what you should
change.
General remarks about your solar system: You can just place your planets at generally random points around your sun. Be sure to place a few so the partially occlude another one - this will test your ray tracing code.
The second installment, coming up a week or so after the first installment, will be to use linear transforms to rotate and translate your solar system to produce different point of view. You can also rotate the planets to different positions around the sun. For extra credit, you can rotate the moon(s) around their respective planets - a hierarchical compounding of transforms.
Distance (AU) | Radius (Earth's) | Mass (Earth's) | Rotation (Earth's) | # Moons | Orbital Inclination | Orbital Eccentricity | Obliquity | Density (g/cm3) | |
Sun | 0 | 109 | 332,800 | 25-36* | 9 | --- | --- | --- | 1.410 |
---|---|---|---|---|---|---|---|---|---|
Mercury | 0.39 | 0.38 | 0.05 | 58.8 | 0 | 7 | 0.2056 | 0.1° | 5.43 |
Venus | 0.72 | 0.95 | 0.89 | 244 | 0 | 3.394 | 0.0068 | 177.4° | 5.25 |
Earth | 1.0 | 1.00 | 1.00 | 1.00 | 1 | 0.000 | 0.0167 | 23.45° | 5.52 |
Mars | 1.5 | 0.53 | 0.11 | 1.029 | 2 | 1.850 | 0.0934 | 25.19° | 3.95 |
Jupiter | 5.2 | 11 | 318 | 0.411 | 16 | 1.308 | 0.0483 | 3.12° | 1.33 |
Saturn | 9.5 | 9 | 95 | 0.428 | 18 | 2.488 | 0.0560 | 26.73° | 0.69 |
Uranus | 19.2 | 4 | 17 | 0.748 | 15 | 0.774 | 0.0461 | 97.86° | 1.29 |
Neptune | 30.1 | 4 | 17 | 0.802 | 8 | 1.774 | 0.0097 | 29.56° | 1.64 |
Pluto | 39.5 | 0.18 | 0.002 | 0.267 | 1 | 17.15 | 0.2482 | 119.6° | 2.03 |
Go to CSU540 home page. or RPF's Teaching Gateway or homepage