Task
Write an OpenGL program to create a simple planetary system using colour cubes to represent the
planets. The image in Figure I shows an example of this.
Construct the simple planetary system scene.
o The scene should consist of a large sun in the centre and four other planets that
orbit the sun. Note that your program should contain the vertex specification of a
single colour cube. The sun and the planets are to use the same vertex specification,
i.e. use transformations to alter the position, size and rotation.
(l mark)
0 Implement basic animation.
Each planet is to orbit the sun. In addition, each planet also rotates about its own
centre. The animation should be updated based on frame time, so that your program
updates consistently regardless of frame rate. The planetary orbits and rotation only
needs to be in the horizontal plane, i.e. rotation about the y-axis.
Allow the user to toggle animation by pressing p on the keyboard.
(l mark)
Reviews
There are no reviews yet.