Assignment 2 - CSU540 Computer Graphics - Spring 2005
Professor Futrelle
Version of 26 January 2005
Second assignment - Constructing and Rendering a Simple Solid
Due by 11:59pm, Friday, February 11th
This is the second assignment and the first programming assignment.
All programming is to be done in Java Swing and 2D.
Your code must compile and run on the College's Sun Solaris system.
In simple English:
- Use the geometry classes I have given you, after
adding the "TO BE COMPLETED" elements.
- You are to construct a simple object near the origin.
- You should then rotate it a modest amount around two axes.
- Then move it approximately to the center of your window.
- Then render it using different colors for the different faces.
In more detail:
- Construct a simple object made up of triangles, with edges of
the order of 50 to 100 pixels. The simplest would be a tetrahedron.
If any faces of your object are four-sided, they should be made up
of two coplanar triangles of the same color. In this way, you could
create a rectangular solid with six faces, comprised of 12 triangular facets.
- Rotate your object π/4 around the x-axis and then π/5 around
the y-axis.
- Then translate it approximately to the center of your window which
should be a fairly large window, e.g., 600 x 400.
- You should use a single transform to do this, constructed from the
product of the three transforms.
- For the colors of the faces, experiment with subtly different colors
using the RGB specs (constructor) for Color.color.
- You should program back-face detection to decide which faces to
display and which not.
- You can gain extra credit by constructing a complex object,
or more than one displayed in the same window or a sequence of
differently positioned objects, e.g., a rotation animation.
- You will lose credit if you have a lot of repeated code,
almost identical, rather than using iteration to construct,
process, and display your object(s).
- Your credit will be enhanced by proper definition of additional
methods and even classes to modularize your system.
- Your credit will be enhanced by generating Javadoc documentation.
This will be required in later assignments, so you might
as well get started!
- Feel free to build on the example code I have posted on our site.
Of course you should not use code from elsewhere that constructs and
displays complex objects. That's your job.
What to hand in and how to hand it in:
- Your source code and compiled code.
- A README-CSU540Sp05A2<yourname>.txt file should be included.
- At least one screen shot file is required,
gig, jpeg, bmp.
- You may zip, jar or tar your files,
with your name, course, year, and assignment number
mashed into the file name.
- Alternatively, your project can be made available
to us through a URL (on a reliable webserver, e.g., CCIS).
The README and screen shot(s) could be in a web page.
If you know how to use .htaccess, you can make your
files available singly and/or as a zip on the site.
- Send your file(s) or URL to the teaching assistant,
Jason Blind at djb@ccs.neu.edu.
- And again, your code must compile and run on
the College's Sun Solaris system.
Go to CSU540 home page.
or RPF's Teaching Gateway or
homepage