Posted: December 23rd, 2014

Introduction to Computer Graphics

Introduction to Computer Graphics

You will need to submit the cpp file containing the solution. The name of the cpp file should follow the following naming convention: CG_Assignment_04_YourID.cpp. Submit the cpp file through the Blackboard.

Use the skeleton GLUT04_Circle.zip. You can use the file sample.cpp as an example on how to use the Point and Vector classes. If the solution does not compile then check the directories of freeglut. Make sure they are correctly configured.
All the program is setup for you. You just need to write the two functions computeCircle and drawCircle in the file GLUT04_Circle.cpp. In computeCircle, given three points A, B and C, you will need to compute the centers and radii of the circumscribed and inscribed circles defined by the three points. Store the center and radius of the circumscribed circle in centre1 and radius1. Store the center and radius of the inscribed circle in centre2 and radius2. Next you will need to implement the function drawCircle. You are given centre and the radius, use GL_LINE_LOOP to draw the circle using its parametric equation. Use 100 steps for the loop, i.e. dt = 0.01. If both functions are implemented correctly then you should see both circles drawn correctly on the screen after the three clicks.

PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET AN AMAZING DISCOUNT 🙂

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Live Chat+1-631-333-0101EmailWhatsApp