Question
Write an OpenGL program that features flying 3D teapots. ****Windows visual studio c++**** The program should meet the following requirements: Construct at least three rows
Write an OpenGL program that features flying 3D teapots. ****Windows visual studio c++****
The program should meet the following requirements:
Construct at least three rows of 3D teapots in the scene (See Fig. 1). In each row, teapots are moving
either leftwards or rightwards (for example, you can make them move leftwards in an odd-numbered
row, and rightwards in an even-numbered row.)
Use a perspective projection system. The background must have 5 walls (as shown in Fig. 1) to provide
a sense of depth. Use smooth shading to render the scene.
Each teapot should be assigned a distinct color (as in Fig. 1), and must be properly lit and shaded. The
walls too must be properly lit and shaded.
Each teapot must be slowly spinning all the time (at a constant speed), using its own up-vector as a rotation
axis. Make sure each teapot uses a different starting rotation angle to avoid synchronized rotations
between neighboring teapots (see Fig. 1).
When a teapot goes out the screen window on one side, it should immediately reappear on the other side
(like they are on an unending loop). Adjacent teapots in the same row should maintain a constant interval
between them all the time.
If the animation is too fast on your computer, slow it down to a level where each teapots movement is
clearly recognizable.
Make sure there is no sudden jump or discontinuity in the animation. The whole sequence of transformations
must be smooth and continuous.
What to submit:
Submit only your source files (.cpp, .h)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started