OpenGL – #2

The Material Solar System

Make a solar system where each planet, and its moon(s), has its own material. By the end of the assignment you should be comfortable with pushing and popping matrices in OpenGL, and have a solid grasp on material properties.

Step 1 – Make your Solar System

  • Your solar system must have a sun. Your sun emits light and should therefore have an emissive material.
  • Your solar system should have (at least) 6 planets that revolve around the sun. Your planets should revolve at different speeds and on different axes, not just x, y, and z.
  • Each planet should have at least one moon that revolves around the planet.

Step 2 – Make it a Material World

Screen Shot 2013-08-06 at 1.11.37 PM

Two planets revolving around the sun.

  • Make each planet and its associated moons a different color and material by modifying the material properties, diffuse, specular, ambient, and shininess. The sun is emissive because it is your light source.  

Questions

Answer the following questions and submit them in (your_netID).pdf. If needed, you may write out your answer by hand and scan in your work.

  1. What is the transformation matrix to rotate theta degrees around the x-axis of a planet located at <5, 3, -2>? Show your work.
  2. What is the transformation matrix needed to rotate a planet about the axis defined by <-1, 1, 1> by 30 degrees? Show all your work and give your orthonormal basis.
  3. The moon is poorly approximated by diffuse shading. What observations tell you that this is true? Make sure to discuss the shading model.
  4. Add a discussion of your planet material properties and how the combination of your diffuse, ambient, specular, and shininess are reflected (pun intended) in your solar system’s appearance.

Hand in

Create a dropBox folder named OpenGL_2 and submit your main.cpp, (net_id).pdf, and a screenshot of your solar system.

 Grading

Code (16 points: part1 x 2 + part2 x 2)

Questions (8 points)

4 (A) Completes all criteria, is creative, shows extensive effort, clean code
3 (B) Completes all criteria, shows basic effort
2 (C) Mostly there, but missing something
1 (D) You handed something in