Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ i need to fill out GenerateCircleData.h When working with OpenGL, it is sometimes useful to be able to draw circles, and the way we

C++ i need to fill out GenerateCircleData.h

image text in transcribed

image text in transcribed

image text in transcribed

When working with OpenGL, it is sometimes useful to be able to draw circles, and the way we do that in OpenGL is by generating points on the circumference of a circle, and joining them with straight lines. If the number of vertices we generate is sufficiently high, then the polygon we have actually looks like a circle. In this exercise your task is to generate a number of points that trace a circle. The function responsible for generating the data is called generatecircleData and it is found in the GenerateCircle Data.h file. It takes in a reference to a vector of Vec pointers. This is where the coordinates of the vertices will be stored. The function also takes a Vec, which specifies the position where the center of the circle should be. Then there is a float parameter specifying the radius of the circle, and finally an int parameter for the resolution. The resoultion parameter controls the number of points that should be generated. The points should be equally spaced along a complete circle. Look at the diagram below to see the points generated for a unit circle, centered at the origin, with a resolution of 10 0.5 0.5 0 0.5 -0 When working with OpenGL, it is sometimes useful to be able to draw circles, and the way we do that in OpenGL is by generating points on the circumference of a circle, and joining them with straight lines. If the number of vertices we generate is sufficiently high, then the polygon we have actually looks like a circle. In this exercise your task is to generate a number of points that trace a circle. The function responsible for generating the data is called generatecircleData and it is found in the GenerateCircle Data.h file. It takes in a reference to a vector of Vec pointers. This is where the coordinates of the vertices will be stored. The function also takes a Vec, which specifies the position where the center of the circle should be. Then there is a float parameter specifying the radius of the circle, and finally an int parameter for the resolution. The resoultion parameter controls the number of points that should be generated. The points should be equally spaced along a complete circle. Look at the diagram below to see the points generated for a unit circle, centered at the origin, with a resolution of 10 0.5 0.5 0 0.5 -0

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

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

Write short notes on Interviews.

Answered: 1 week ago

Question

Define induction and what are its objectives ?

Answered: 1 week ago