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

  Create a simple warm-up program using your g3d

Create a simple warm-up program using your G3D programming and graphics environment.

  Shadow effect while rolling a sphere

Shadow effect while rolling a sphere as well as the options of shading and lighting.

  Relative positioning and interactive positioning

Relative Positioning and Interactive Positioning by Dragging and Clicking and some Simple Animation

  Draw a teapot at the global origin

Draw a teapot at the global origin

  Concepts of computer graphics

Concepts of Computer Graphics and develop a program using OpenGL

  The security policy document outline

Using the GDI Case Study below, complete the Security Policy Document Outline

  Develop the image manipulations

Develop the image manipulations

  What does resolution mean

What does resolution mean How is resolution connected to ppi and dpi units

  Differentiate between a bitmap image and a vector image

Differentiate between a bitmap image and a vector image Explain the following terms

  Essential elements of a design pattern

configuration of an Iterator pattern, patterns could be used in a Library System, Singleton, Template, Decorator, Façade,What does Alexander means by the following declaration "But it is impossible to form anything which has the temperament of natu..

  Framework of user interface design

design of user interfaces, natural mapping, GUI applications, web page design different to designing for printed media, risks exposed in this "phone as individual proxy" approach, interaction designers of ubicomp applications, Storyboards are usual..

  What are the factors affecting picture composition

Define picture composition What are the factors affecting picture composition. Elaborate on each factor Describe the basic lines present in a composition

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