Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CS 482.001 - Computer Graphics Fall 2016 Your second programming assignment is to expand a simple entire solar system. The program uses texture mapping of similar fashion to the earth and moon. The flying NASA implemented on simple quadrilaterals, which will enable you Programming Assignment #2 (75 points) Due: 12:00 Noon, Thursday, September 22, 2016 model of the earth and the moon (illustrated below) into a more elaborate model of the quadric surfaces and simple quadrilaterals. The additional planets will be modeled in a logo in the original program is provided to illustrate how texture mapping may be to handle the particle system that surrounds the new sun model. Linked to the course Web site (http://www.cs.siue.edu/wwhite/CS482/Syllabus.htm) is a project file containing the earth and moon model. Your assignment is to expand this model to include the sun and all of its surrounding planets, using the following set of specifications: Planet Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto Planet Radius 0.1 0.18 0.18 0.3 0.6 0.5 0.3 0.3 0.05 Orbit Radius 1.5 2.0 3.0 3.5 5.0 7.0 8.5 9.0 10.0 Orbit Duration (in Earth days) 88 225 365 686 4333 10759 30685 60190 90800 Rotation Duration (in Earth days) 59 -243 1 1 0.4 0.4 -0.7 0.7 -6 Inclination (in degrees) 7 3 7 2 1 2 1 2 17 Note that negative rotation durations represent rotations in the direction opposite to that of the earth. Also, the planet Saturn has rings with an outer radius twice the size of the planet’s radius. Bitmaps to support all of the planetary textures have been provided. In addition to the existing key-control of viewer position (arrow keys for viewing angle, z/Z for zooming in and out) and animation speed (+/-), you will need to provide key controls for activating and blending the sun’s particle system (i.e., b/B for toggling blending, p/P for toggling particles). The particle system will surround the unit-radius solar sphere (centered at the origin) with hundreds of texture-mapped quadrilaterals, as illustrated on back of this page. When blended (see pages 357-362 of the OpenGL SuperBible for details), the combined effect of the particle system is to surround the sun with a flowing luminescent glow. Each square particle should have the following characteristics: Size, ranging between a minimum and maximum size. Radius (r), varying slightly from the radius of the sun’s sphere. Zenith (), varying slightly from its original value between 0 and . Azimuth (), varying slightly from its original value between 0 and 2. Color, varying somewhat from some base color (probably a reddish hue). Lifespan, varying slightly from some base value to make the square appear to fade away. Note that the code for the particle system class has been provided. It just needs to be instantiated and activated within your driver. The RGBpixmap code used to texture map the original earth and moon models may be used similarly for the other spherical objects. Note that a gluCylinder quadric object (with negligible height) may be used to model the rings of Saturn. An executable version of this program is provided. Note the required functionality, illustrated below: The sun with its particle system deactivated. The particle system is activated, but blending has been turned off. Activate blending, giving the sun’s surface a fiery, gaseous appearance. The solar system, as seen from an overhead vantage point. Zip-compress a folder containing only the relevant .cpp and .h files, and copy it to your dropbox by Thursday, September 22, 2016, at 12:00 Noon. Late assignments are not accepted without verifiable medical documentation. You must write your own code, and no one but the instructor may see your code.