Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use C++ Use C++ Render four objects in four viewports of a single display window. (An example is provided at the end.) Set the

Please use C++

image text in transcribed

image text in transcribed

Use C++

Render four objects in four viewports of a single display window. (An example is provided at the end.) Set the display window size to 512 by 512 pixels. Show your name (or both names if you work with a partner) in the title of the display window. o By showing your name(s) in the title, you certify that the job is your individual work (or a fair share with your partner). For each object, the clipping window coordinates are (-10, 10] by [-10,10), and the background color is the same. o The background color is suggested to be (0.7.0.7.0.7, 1.0) in RGBA, but you can use your own background color. The four objects are described below. 1. Design a stipple pattern and use it to stipple a triangle with the vertices (-8,-6), (8,-6), and (O. 8) . You must design your own pattern. You need render the triangle twice, with different colors. i. The first one is a filled triangle. ii. The second one is a stippled triangle with the pattern. 2. Draw the polar curve = 4[1-cos() sin(40)], 030321 Use a color that is apparently different from the background color Set the line width to 2. Draw the xy-coordinates as a reference. In a shallow color and the line width is 1. 3. Draw a clock with a round face, 12 ticks and 3 hands. The face is a round disk filled with a color different from the background i. The radius of the disk is 8. The ticks are in a different color. i Atick is a short line segment. For example, the tick at 1 o'clock could be a line segment connecting (0.9* radius* cos 60,0.9* radius *sin 60%) and (radius* cos 60,radius* sin 60). The hands point to the time 3:45. 4. Shade the region between the curves of y = V16-x and y=216-x? bver the interval (-4,4). Use GL QUAD STRIP to shade the region because the region is concave. Use a different color to draw the curves with thick line strips. As a reference, draw the xy-coordinates as well. Each of the above four objects is rendered in a viewport that is a quarter of the entire display window. Order does not matter. Your result should be similar to the following example. English (United States) 55 words DS Type here to search Select- Styles 5 Editing Tieling Chen, Assignment 1 DO Render four objects in four viewports of a single display window. (An example is provided at the end.) Set the display window size to 512 by 512 pixels. Show your name (or both names if you work with a partner) in the title of the display window. o By showing your name(s) in the title, you certify that the job is your individual work (or a fair share with your partner). For each object, the clipping window coordinates are (-10, 10] by [-10,10), and the background color is the same. o The background color is suggested to be (0.7.0.7.0.7, 1.0) in RGBA, but you can use your own background color. The four objects are described below. 1. Design a stipple pattern and use it to stipple a triangle with the vertices (-8,-6), (8,-6), and (O. 8) . You must design your own pattern. You need render the triangle twice, with different colors. i. The first one is a filled triangle. ii. The second one is a stippled triangle with the pattern. 2. Draw the polar curve = 4[1-cos() sin(40)], 030321 Use a color that is apparently different from the background color Set the line width to 2. Draw the xy-coordinates as a reference. In a shallow color and the line width is 1. 3. Draw a clock with a round face, 12 ticks and 3 hands. The face is a round disk filled with a color different from the background i. The radius of the disk is 8. The ticks are in a different color. i Atick is a short line segment. For example, the tick at 1 o'clock could be a line segment connecting (0.9* radius* cos 60,0.9* radius *sin 60%) and (radius* cos 60,radius* sin 60). The hands point to the time 3:45. 4. Shade the region between the curves of y = V16-x and y=216-x? bver the interval (-4,4). Use GL QUAD STRIP to shade the region because the region is concave. Use a different color to draw the curves with thick line strips. As a reference, draw the xy-coordinates as well. Each of the above four objects is rendered in a viewport that is a quarter of the entire display window. Order does not matter. Your result should be similar to the following example. English (United States) 55 words DS Type here to search Select- Styles 5 Editing Tieling Chen, Assignment 1 DO

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions