Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Graphics Expert

Instructions

Open the file "Lab 3.sln". You are given a skeleton program that displays a ball with only flat shading.

Step 1: Add in the normals for smooth shading.

357_Skeleton program.png

By pressing ‘S', the program will switch to smooth shading and turn the variable m_Smooth to be true. You have to put in the correct normal for each vertex in the function drawSphere(). Also please put suitable comments to explain why and how your normal is computed. After adding the normal computation, your sphere should look like the figure on the left.

Step 2: Add in the highlight.

By pressing ‘H', the specular term will be active and there should be some highlight in your object. You should put in the material property if the variable m_Highlight is on. So your sphere should look like the right figure above.

1125_Skeleton program1.png

Step 3: Create your own object(s).

Now, it is the turn for you to show your creativity and make your own object. The main drawing routine is the function display() in the file main.cpp. Modify it if necessary and make your program to display another primitive object by pressing ‘2'. You have freedom to create any object that is not totally flat. Namely, your new object must have some curved surfaces, e.g. an ellipsoid, a cone, a paraboloid, etc.

Do not create an object which only consists of flat surfaces such as a cube or a tetrahedron. Your new object must be able to be displayed in all flat shading, smooth shading and with or without highlight modes. You can create more than one primitive object if you want.

Step 4: Create your own composite objects.

A composite object is constructed by various transformations and copies of your primitive objects. Construct a function to display your composite objects and name your creation an artistic title. The sample program gives two such objects, the one in the very first beginning of this document is called "Da Human Code" and another named "Diamond" in the figure below. In this assignment, construct two such composite objects (for ‘3' and ‘4').

587_Skeleton program2.png

We will grade how innovative and beautiful your objects are as well as how compact and clever your program is, e.g., the examples above are only about ten lines of C++ code. However, please do NOT create any offensive objects that cause any harassment.

In this assignment, you cannot use any library, e.g. drawSolidSphere() in GLUT library, to help you create an object. You must specify the polygon vertices of your object by yourself.

Attachment:- Assignment.rar

Computer Graphics, Computer Science

  • Category:- Computer Graphics
  • Reference No.:- M91582650
  • Price:- $280

Guranteed 48 Hours Delivery, In Price:- $280

Have any Question?


Related Questions in Computer Graphics

You have a program draw a rectangle on the screen and allow

You have a program draw a rectangle on the screen and allow the user to change the color/size of the rectangle. The program will store in the browser the settings of the color/size so that upon revisiting the page, the v ...

Please read my question if you post copy and pasted code

Please read my question if you post copy and pasted code you will get a negative review. This is java In this graphical program, you are going to simulate arcade car racing game. You need a single player that is movable ...

The saffir-simpson hurricane scale classifies hurricanes

The Saffir-Simpson Hurricane Scale classifies hurricanes into five categories numbered 1 through 5. Write an application named Hurricane that outputs a hurricane's category based on the user's input of the wind speed. CA ...

The problemyou are to search a bitmap in rgb format and

The problem: You are to search a bitmap in RGB format and count the number of pixels which match a set of colors. The bitmap will be 1024 by 1024 pixels for the purposes of explaining this problem. The set of colors will ...

Question a describe the architecture of simple raster

Question : a) Describe the architecture of simple raster graphics system? b) Explain raster scan display processor?

The problemsit is strongly recommended that you tackle the

The problems: It is strongly recommended that you tackle the following tasks in a modular way -- a separate standalone function for each task. Draw a rectangle as a Rectangle and as a Polygon. Make the lines of the Polyg ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As