Course: CSE 5542

Assignment: Laboratory 4 - A Fly in our Solar System !

Instructors: R. Machiraju, Tzu-Hsuan Wei

Due Date: April 28.

Review Dates: As needed.

Goal: We will go planetary and you (the camera) will be a fly in the solar universe moving around.

  1. Background: The lab is very inspired by a lab announced by Prof. Samuel Buss in his course offering at the University of California - San Diego (http://www.math.ucsd.edu/~sbuss/CourseWeb/Math155A_2012W/Project2/155Aproject2.pdf). Note the code is not downloadable from the site mentioned on the UCSD course page. See below at Kickstart. Please peruse the code found in that web site and also peruse the following for information:
  1. http://mathematica.stackexchange.com/questions/19268/creating-a-simulation-of-our-solar-system
  2. http://reference.wolfram.com/language/ref/PlanetData.html
  3. http://ssdbook.maths.qmul.ac.uk/animations/
  4. http://www.kayelaby.npl.co.uk/pdfs/sections/section_2_7.pdf
  1. Kickstart: Understand the code in the Solar program found at Prof. Buss’s Book page - http://www.math.ucsd.edu/~sbuss/MathCG/OpenGLsoft/Solar/Solar.html. Compile and run the program. Test out the  keyboard controls. When the program first starts, aliasing causes the planet to appear to  not be rotating, but instead always keeping the same face to the sun. Slow down the  animation (up/down arrow keys) to see the "true" motion.
  2. GLSL Pledge: We need to live in GLSL. Prof. Buss’s code is all in OpenGL which is a NO-NO for our assignment.
  3. Mathematica - This mathematics toolbox  is available for all students and faculty on campus. They have a comprehensive description of Astronomical Data. Please download it if you so wish; you will have easy access to astronomical facts.
  4. Scene Design -
  1. Follow the tenets of hierarchical scene design. We will discuss this in class.
  2. Planets and moons can be modeled as spheres.
  3. Orbits, inclinations and such can be found http://reference.wolfram.com/language/ref/PlanetData.html
  4. Convert the sun to be a binary star. Replace the existing single sun by two smaller  suns that rotate around each other in the center of the solar system. Have them revolve around each other approximately 20 times per earth year.
  5. Add a second, geostationary moon to the Earth. By “geostationary” it is meant that the moon stays directly above the same point on the equator. That is, a person standing still  at the right point on the equator, would always see the moon directly overhead.
  6. Add other planets of the inner solar system (Mercury, Venus, Earth and Mars). Use the information in source 1.1 and source 1.2  to get the orbits. Note the inclination of the earth is shown as 1 in those sources.
  1. Texturing, Coloring -
  1. Material Properties - Choose colors that make all planets and moons  clearly visible and distinguishable. Choose material properties that reflect best your understanding of the planet’s physical properties.  Earth is dull; Mercury is glowing; Mars is boring dull; the sun is bright and shiny. Use properties from Astronomical Data in source 1.2.
  2. Base Textures: Using Astronomical Data in source 1.2 and images color the planets. The texture should be especially visible when you are close to the planet.
  3. Seasonal Tilt - Give the Earth and its moons and  a 40 degree  tilt. The kind of tilt is similar to the somewhat smaller tilt of our real earth that causes the  earth to have seasons. This means that the orbital path of the Earth should not be tilted; instead the tilt just applies to the orientation of the Earth and to the path followed by the moons. Thus the tilt should always be in the same direction (in the direction of the negative x axis, for instance): it should not always be tilting at the same angle relative to the sun.  Which again implies that  it will be “summer” in the northern hemisphere when the Earth is at its rightmost position on the screen. The orbits of the Earth's moon should be tilted by the same amount so that they are always above the equator of the planet. That is to say, the centers of the Earth, and the moon are coplanar and the rotation axis for the Earth is perpendicular to this plane.
  4. Illumination from the sun - Compute illumination as the planets rotate. You are expected to compute the intensity . Think of the sun as a source which is at its highest.
  5. Particle Methods - Simulate meteor showers
  6. Background - You can use “star dust as a back ground texture”.
  1. Camera and Camera Paths -
  1. As part of earlier steps, adjust the orbital radii, the orbital rates, view distance, view  angle, etc. Make changes to the viewing distance, the viewing angle, and to the sizes of the suns, planets and moons and to the radii of the orbits, so as to make viewing the solar system convenient. This probably includes placing the view point further away  from the solar system to reduce the excess perspective. You may need to adjust the field of view argument to perspective transform.
  2. Follow a path in the solar system and render it. Essentially, the camera follows a path; the planets rotate and you render what you see. The camera path can be built by hand, or could reside on a sphere or just be random. You are a fly in the universe taking pictures.
  1. Group Mechanics - Divide each of the three components among the three of you (or less or more). Do identify who did what. Also, make sure all components work well together.
  2. Submission - Carmen, please. All source. All textures. And the README file.
  3. Review Dates - We will review the code in class as needed.