Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Refer to the OpenGL code fragment in Figure 3 below: qlBegin (GL POLYGON) glVertex3f(-0.7f, -0.5f, 0.0f); glVertex 3f (0.7f, -0.5f, 0.0f); gl Vertex3F(0.4, 0.5f,

image text in transcribed

a) Refer to the OpenGL code fragment in Figure 3 below: qlBegin (GL POLYGON) glVertex3f(-0.7f, -0.5f, 0.0f); glVertex 3f (0.7f, -0.5f, 0.0f); gl Vertex3F(0.4, 0.5f, 0.0f); glVertex 3 (-0.45, 0.5f, 0.0f); glEnd(); Figure 3: OpenGL code fragment i. What is the shape of the polygon drawn using the code fragment in Figure 3? (2 marks) it. Add codes so that each vertex has different colour. (4 marks) ili. In OpenGL, we can associate a color with each vertex. What happen if the endpoints of a line segment have different colors assigned to them? (3 marks) b) Explain how any sequence of rotations and translations can be replaced by a single rotation about the origin followed by a translation. You may illustrate your answer with diagrams. (16 marks) a) Refer to the OpenGL code fragment in Figure 3 below: qlBegin (GL POLYGON) glVertex3f(-0.7f, -0.5f, 0.0f); glVertex 3f (0.7f, -0.5f, 0.0f); gl Vertex3F(0.4, 0.5f, 0.0f); glVertex 3 (-0.45, 0.5f, 0.0f); glEnd(); Figure 3: OpenGL code fragment i. What is the shape of the polygon drawn using the code fragment in Figure 3? (2 marks) it. Add codes so that each vertex has different colour. (4 marks) ili. In OpenGL, we can associate a color with each vertex. What happen if the endpoints of a line segment have different colors assigned to them? (3 marks) b) Explain how any sequence of rotations and translations can be replaced by a single rotation about the origin followed by a translation. You may illustrate your answer with diagrams. (16 marks)

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions