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

  Write a gui application that produces a restaurant bill

Write a GUI application that produces a restaurant bill. You create a bill calculator to generate window output. You should prompt the user to enter all the dishes and their prices using JOptionPane, and then display all the dishes, their prices, ..

  Incorporates text as an integral part of the image

use illustrator to draw, focus on typography to create an illustration that incorporates text as an integral part of the image or image shape

  Bullhow might swot and pest value chain analysis

bullhow might swot and pest value chain analysis statistical data methodologies and other research processes used to

  What is cadastral surveying and mapping what is spatial

1.what is cadastral surveying and mapping?2.what is spatial data information sdi?3.what is the bathurst declaration and

  The rationale for a firms cooperate-level strategy is

the rationale for a firms cooperate-level strategy is applied to cooperative strategy. select one of the three types of

  Specify a triangle with three mouse presses

Write a program that allows the user to specify a triangle with three mouse presses. After the first mouse press, draw a small dot. After the second mouse press, draw a line joining the first two points.

  Display an orthogonal view of two animated 3d objects

Develop ONEC++ program to display an orthogonal view of two animated 3D objects and create two texture patterns. Texture 1 is a manually-constructed texture and Texture 2 is a texture converted from an input image.

  Draw a wireframe polygon using bresenham algorithm

In this project, you will implement a program that will do three things: Allows the user to draw a wireframe polygon (i.e., series of lines) using Bresenham's line drawing algorithm. Allows the user to change the current drawing color (for items alre..

  Write an easy to use gui application

easy-to-use GUI application

  Enhance the buttonviewer program so that it prints the time

Enhance the ButtonViewer program so that it prints the time at which the button was clicked.

  Design a program that demonstrate passing argument

I need to design a program that demonstrate passing arguments ByVal and then ByRef. I just need help with the coding.

  Preserving digital media

Preserving digital media

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