Write code to perform tessellation

Assignment Help Computer Graphics
Reference no: EM13917868

Assignment:

For this assignment, you'll need to write code to perform tessellation of the 4 basic shapes.

You can download the files for this assignment from myCourses. Look in the content area under the resources category. The zip In contains files for both C++ as well as Java.

Like the previous assignments, stubs for the functions you need to write are provided for you with descriptions of what each of the functions should do. You will find these stubs in the files cg1Shape.cpp and cg1Shape.h (for C++) and cg1Shape.java (for Java). These are the only files from the distribution that you should modify, though you are welcome to include additional source files if needed.

Note that when creating the tessellations for your shapes, you should make use of the supplied addTriangles () routine to add a triangle to the current shape. This routine is found in the file/class simpleShape. Vertices of the triangles should be specified in counter clockwise order.

Interacting with the application

A simple key press based UI is provided with the application. The controls are as follows:

Key  Function
x  Rotate current shape forward about the x-axis
X  Rotate current shape backwards about the x-axis
y  Rotate current shape forward about the y-axis
Y  Rotate current shape backwards about the y-axis
z  Rotate current shape forward about the z-axis
Z  Rotate current shape backwards about the z-axis
Z  Rotate current shape backwards about the z-axis
c  Make the current shape a cube (using current tessellation settings)
C  Make the current shape a cylinder (using current tessellation settings)
n  Make the current shape a cone (using current tessellation settings)
s  Make the current shape a sphere (using current tessellation settings)
+  Increments the primary subdivision of the current shape by 1
=  Increments the secondary subdivision of the current shape by 1
-  Decrements the primary subdivision of the current shape by 1
_  Decrements the secondary subdivision of the current shape by 1
q  Quit the application
Q  Quit the application

Your submission should only include the files for the class/routines that you have modified plus any other auxiliary classes that you have created. For the Java version, this would mean the file cg1Shape java and for the C++ version, this means the files calShape cpp and cg1Shape . h. PLEASE DO NOT SUBMIT code for any other of the supplied files.

You are encouraged to discuss the tessellation algorithms with other students in the class. However, you must write your own code. Please do not use code obtained from the web. There are only a few websites with code solutions to these types of problems; it will be obvious if you use any of them.

Attachment:- Assignment.rar

Reference no: EM13917868

Questions Cloud

Which leadership styles did hasting use at pure software : Which leadership styles did Hasting use at Pure Software and Netflix? How effectively were these leadership styles used?
Cryptographic basis of the enigma machine : A 2,000-bit message is used to generate a 256-bit hash. One the average, how many other messages could be expected to generate the same hash value? What does this tell us about the length of a hash as compared to the length of the message?
Discuss the target population you would like to work : Assume that you will be pursuing a career as a health psychologist and plan to go to graduate school. Discuss the target population you would like to work with and why. In what ways will stress effect this population, and in what way will age play..
Common stock-preferred stock and debt : Information on Janicek Power Co., is shown below. Assume the company’s tax rate is 38 percent. Debt: 9,800 9.3 percent coupon bonds outstanding, $1,000 par value, 22 years to maturity, selling for 97.5 percent of par; the bonds make semiannual paymen..
Write code to perform tessellation : Discuss the tessellation algorithms with other students in the class. However, you must write your own code - Write code to perform tessellation of the 4 basic shapes.
The internal rate of return is the most reliable method : "Which one of the following statements is correct? The internal rate of return is the most reliable method of analysis for any type of investment decision. The payback method is biased toward short-term projects.
Cryptographic basis of the enigma machine : A 2,000-bit message is used to generate a 256-bit hash. One the average, how many other messages could be expected to generate the same hash value? What does this tell us about the length of a hash as compared to the length of the message?
Merger valuation with change in capital structure : Hastings Corporation is interested in acquiring Vandell Corporation. Vandell has 1 million shares outstanding and a target capital structure consisting of 30% debt; its beta is 1.20 (given its target capital structure). Vandell's debt interest rate i..
The net working capital will return to its original level : Your firm is contemplating the purchase of a new $1,628,000 computer-based order entry system. The system will be depreciated straight-line to zero over its 5-year life. It will be worth $158,400 at the end of that time. The net working capital will ..

Reviews

Write a Review

Computer Graphics Questions & Answers

  The facts presented in the infographic

To get a different perspective on customer centric business models that often have some sort of "value added" think about what you, as a customer, have experienced. Do you have loyalty to any ape of product or company.

  Make a list of eight shots in picture composition

What are the specific instructions that the director gives to the camera operator to perform each operation Make a list of eight shots in picture composition

  Modify the inventory program to include an add button

Modify the Inventory Program to include an add button, a delete button, and a modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each ..

  Show the matrix and the starting points

you do not need to show matrix math calculations, but you should show the matrix and the starting points and the results for each geometric transformation.

  Need of slide presentation

The leadership within that company has decided to pursue the idea of outsourcing a virtual desktop solution that would allow much more flexibility and secure desktop delivery. You know that there are multiple virtual desktop solutions out there, b..

  The rmo csms marketing subsystem

Using Microsoft Visio or an open source alternative such as Dia, create a use case graphic rendering that shows all actors and all use cases for the RMO CSMS marketing subsystem. Note: The graphically depicted solution is not included in the requi..

  A graduate student has four job offers and needs to accept

a graduate student has four job offers and needs to accept one. the following table lists the four jobsnbspnbspthese

  Draw and explain the diagram of a raster scan system

Draw and explain the diagram of a Raster scan system with a display processor. Explain each unit of the diagram.

  Ljfkdjfk sdkfj ksdjkfjsdk j sd fldsl klsdl lsdlfkldsk

sd fldsl klsdl lsdlfkldsk lksldkflksdlfklksdl lsdklf l sd fldsl klsdl lsdlfkldsk lksldkflksdlfklksdl lsdklf l sd fldsl

  Part 1the president of c r plastics jamie bailey has hired

part 1the president of c. r. plastics jamie bailey has hired you for your expertise as a strategic management

  Determine transfomation of triangle

Determine a transfomation of triangle A(1,0),B(0,1),c(1,1)by:- a) rotating 45 degreeabout origin and then translatingin x and y direction.

  Website template design

Recognize a few sites that appear to be designed using either a template or style sheet. What types of documents lend themselves easily to templates?

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