Construct a function to display your composite objects

Assignment Help Computer Graphics
Reference no: EM13909716

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

Reference no: EM13909716

Questions Cloud

Past interpretations of government and its role? : past interpretations of government and its role?
Explain relationship between discount rate and present value : Although the payment made on an amortized loan is constant, it can be decomposed into two components. What are the TWO (2) components? Describe the patterns of each component over time.
Justification for implementing a database management system : You have been hired as a consultant for a small retail company that sells widgetsonline. The company is interested in learning how to use their data to improve theirbusiness. They have asked you to write a business case (search term business casetemp..
Hi test company uses the weighted average method : Hi Test Company uses the weighted average method of process costing to assign production costs to its products.
Construct a function to display your composite objects : You are given a skeleton program that displays a ball with only flat shading - Construct a function to display your composite objects and name your creation an artistic title. The sample program gives two such objects.
What is the cost of capital for this project : Suppose CFO will borrow 50% of capital from a bank with 10% interest, and 50% of capital through equity with 22% of require rate of return. What is the cost of capital for this project?
Find the mean and variance of x : Find the mean and variance of X. Assuming that {Xm; m ≥ 1} is an IID sequence with the distribution of X and that Sn = X1 + ··· + Xn for each n, find the mean and variance of Sn. (No explanations needed.)
Find the moment generating function of x : Find the moment generating function (MGF) of X (or find the Laplace transform of fX (x)), and use this to find the moment generating function (or Laplace transform) of Sn = X1 + X2 + ··· + Xn. Invert your result to find fSn (t).
What is the cash flow at the end of the 4th year : At an inflation rate of 9 percent, the purchasing power of RM1 would be cut in half in 8.04 years. How long to the nearest year would it take the purchasing power of RM1 to be cut in half if the inflation rate were only 4 percent?

Reviews

Write a Review

Computer Graphics Questions & Answers

  Modifying the product program through gui

Modify the product Program to use a GUI. The GUI should show the data one product at a time, including the product number, the name of the item, the number of units in stock.

  Choose two 2 public corporations in an industry with which

choose two 2 public corporations in an industry with which you are familiar - one 1 that has acquired another company

  Write a gui program with check buttons

Write a GUI program with check buttons that allow the user to select any or all of these services. When the user clicks a button the total charge should be displayed.

  Write a narrative that describes how about designing

Write a narrative that describes how you went about designing and implementing these modifications, how you tested your program. Did you use the test case during development or did you use the final words.txt from the start, or what?

  Why menu-driven interfaces continue to be popular

Suggest at least three (3) strategies for making menu-driven interfaces visually appealing in the modern computing environment.

  What challenges the engineering team make user-friendly gui

What challenges the engineering team must have faced to make such user-friendly GUIs. What are two key features that should be included in all mobile devices? For each, suggest a simple algorithm that may power these features.

  Plot the vertices of a n-sided polygon

Using Java, Write a code that reads an integer n, followed by the coordinates of each of n points that are the vertices of a n-sided polygon. Plot the vertices and the lines that make up the polygon.

  Is lesson age-appropriate

Using the Technology Integration Matrix, or theArizona Technology Integration Matrixchoose two different lessons for the grade level (K-5, 6-8, 9-12) you are becoming certified in.

  What are the advantages of 3d-printing

What are the advantages of 3D-Printing and what are the disadvantages?

  Question 1a the term multimedia describes a number of

question 1a the term multimedia describes a number of diverse technologies that allow visual media to be taken and

  Write a program that allows the user to verify entry

If it matches, the program should report success and end; otherwise the program should report that the code entered is incorrect, and then start over from the beginning.

  Create a basic web page

It is critical that you keep your Web site material organized and easy to use. By having a file structure that is easy to use, you will be able to place material in the appropriate folder and have it available when it is needed.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd