Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMPUTER GRAPHICS * Write an OpenGL program that features flying 3D teapots. Name your source code hw2.cpp. The program should meet the following requirements: Construct

COMPUTER GRAPHICS

* Write an OpenGL program that features flying 3D teapots. Name your source code hw2.cpp. 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.

//Source files (.cpp, .h) that are needed for compilation.

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

Students also viewed these Databases questions