

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

![[Courses]](../icons/up.png)
![[Rich]](../icons/prev.png) ![[Home]](../icons/home.png) ![[Rich]](../icons/next.png)
![[Author]](../icons/author.png) |
Purpose
The purpose of this lab is to develop an understanding of how
three-dimensional computer graphics applications are implemented.
Acknowledgement
This lab was developed by Dr. Henry
Welch.
General Lab Information
Implement a simple 3-D graphics system for drawing the wireframes of
polyhedral objects.
As a minimum your package should do the following:
- Allow the specification of polyhedra using files. The files
lab8a.dat (a cube),
lab8b.dat (a tetrahedron), and
lab8c.dat (a duck) contain examples which
specify a polyhedra as a set of edges. (i.e., There are two 3-D
points per line. This is not the best long term
specification, but it is sufficient for the requirements of this
assignment.) You may find it necessary to edit these files to
conform to your image::Read; feel free
to do so.
- Place the origin of the world coordinate system in the center of the
drawing area/viewport.
- Position the observer at infinity and specify the direction of view
using a compass angle (with vertical up on the screen which defines
north and corresponds to 0 degrees) and an angular displacement
from vertical with 0 degrees being straight down. Think of this as
the point of view taken by someone looking down from an airplane
(like looking at a map with vertical relief). The compass heading
controls which way is up and the climb or descent of the aircraft
allows us to see the "front" or "back" of the object as well as
the top. This in effectively a spherical coordinate system (i.e.,
angle from z and angle around z in the xy plane). This leaves the
view-up direction somewhat ambiguous. Assume it starts aligned
with due north and rotates with the spherical angles.
- Allow this orientation to be changed using the command line or
other mechanism while your program runs. You may want to experiment
with the dial,
slider or
spinbox controls.
To use these properly you will need to learn about signals and slots
within Qt. You can also easily insert the controls using the
QVBoxLayout
widget called mainLayout in the shell.
- It is NOT necessary to develop a polyhedra class
you may do this all with lines. (This will, however, make it difficult
to do surface effects which we may ultimately want to implement.)
Note: This lab is worth double credit (200 points)
Application demonstration
You should demonstrate the successful operation of your application before
or during last formal meeting time (lab or lecture) during week 10.
(Section 1: Friday class, Section 3: Thursday class, Section 4: Friday lab)
Note: for full credit, you will need to be able to demonstrate your
application using the terminology described in this assignment. (It is
not sufficient to just say, "See, I can make the duck spin on it's tail.")
Lab report (due 11pm, the day prior to your demonstration due date)
The lab report need not be self-contained. Your report should include:
- Discussion including:
- A tally of the number of new Non-commented Lines Of
Code (NLOC) written for this lab assignment. You should use the
CLC
perl script on your code. If possible, break the NLOC down
into the various features you needed to implement.
- A summary of your activity log indicating how much time you spent
on each phase of the assignment. Please report the time in the
following categories:
- Designing
- Coding
- Debugging (before you think it's working)
- Testing (after you think it's working)
- Report writing
- Other
- A brief narrative -- the problems you encountered, how you solved them,
and what you learned.
- Documented source code (clearly
identifying any changes made since your last submission) Note: you
should include all the source code necessary to compile your project
except for unmodified source code written by Dr. Welch. For example, you
don't need to include shell.cpp if you didn't
modify it.
You may wish to use gensrc, a shell script which
will produce an XML document that may be used as a starting point for
your report. The file will include all of the source code files
(provided you modify the script appropriately... edit gensrc for
details on how to do this.)
- Extra credit is available but only if it is clearly identified during
the demonstration and in your report.
- Be sure to address any areas concern from previous
submissions.
As with any report you submit, correct spelling
and grammar are required. In addition, your report should be submitted
electronically following the Electronic
Submission Guidelines. (You may wish to consult the
sample report before submitting your
report.) Be sure to keep copies of all your files, in case something
gets lost. It may be wise to keep a diskette backup as well.
If you have any questions, consult the instructor.
|