Question: Modify your program from Exercise 6.1 so that the imported NASA shuttle object from Figure 6.16 also orbits the sun. Youll want to experiment with

Modify your program from Exercise 6.1 so that the imported NASA shuttle object from Figure 6.16 also orbits the “sun.” You’ll want to experiment with the scale and rotation applied to the shuttle to make it look realistic.

Figure 6.16O United States United States  ON Aans

Exercise 6.1

Modify Program 4.4 so that the “sun,” “planet,” and “moon” are textured spheres, such as the ones shown in Figure 4.11.

Program 4.4private Matrix4fStack mvStack = new Matrix4fStack(5); public void display(GLAutoDrawable drawable) { // setupgl.glDrawArrays(GL_TRIANGLES, 0, 18); mvStack.popMatrix(); ||------- cube == planet} //-- smaller cube == moon mvStack.pushMatrix(); mvStack translate(0.0f, (float)Math.sin(tf)*2.0f,Figure 4.11O United States United States ON Aans

O United States United States ON Aans

Step by Step Solution

3.51 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Graphics Programming Questions!