CS321 -- Lab 6: Transformations



->Courses
->CS321
-->Presentation
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
->Lab 6
-->Lab 7
-->Lab 8
->Electronic Submission
->Old Exams
->C++ Examples
->Unix Help
->Software
->Tentative Schedule
->Support Forum
->Course Policies

[Courses]
[Rich][Home][Rich]
[Author]

Fall Quarter 2002

Assignment

The details for this lab are located here.

Modifications from Above

The following modifications apply to students in my section of computer graphics:

  • Your program does not need to read the files given on the above webpage. (ignore item 1)
  • Your program should be able to read and display these files: bunny.img, duck.img, and teddy.img. Lines that begin with a semi-colon should be ignored. The remaining lines specify colored 3D lines. The line format is:
          TYPE R G B x1 y1 z1 x2 y2 z2
          
    where TYPE of 2 indicates a line, R, B, and B describe the line's color, and the remaining numbers describe the two end points of the line.
  • You should disregard the positioning specifications given on the above webpage (ignore item 3).
  • When an image is loaded from a file, the viewing position should be chosen as follows: calculate the span of coordinates along each axis. The axis with the shortest span should become the surface normal for the viewing coordinates. The axis with the largest span should become the up vector for the viewing coordinates. Furthermore, the image should be centered in the drawing area and should be scaled so that the image fills 80% of the drawing area (the aspect ratio should be preserved).
    For example, if an image consisted of a box with corner coordinates of (0, 0, 0) and (10, 20, 30), the xworld should be chosen as the surface normal for the viewing coordinates and the zworld axis should be chosen as up vector. This would result in a rectangle being displayed. The rectangle would be translated and scaled so that two of the corner coordinates for the rectagular are: (156,35) and (343,215).
  • Once displayed, your application should be able to perform arbitrary rotations (around any axis) via a dial, slider, or spinbox control.
  • You are required to meet all of the minimum requirements on the assignment page except for items 1 and 3.

Lab report (due 11pm, day prior to week 9 lab)

Your lab report need not be self-contained. Your report should include:

  • A brief discussion of any problems you had and suggestions you have for how the lab could be improved.
  • A tally of the number of Non-commented new Lines Of Code (NLOC) written for this lab assignment. You should use the CLC perl script on your code. Note: The first line of the file should be:
    #!/usr/bin/perl
    . It will report how many lines and statements of code you wrote. NOTE: For accurate results you should run it on the provided code first and then subtract that since you didn't write that code.
  • A summary of your activity log indicating how much time you spent on the assignment (following the template provided in the lab2.xml template document). Please use the following categories:
    • Design
    • Coding
    • Debug (before you think it's working)
    • Test (after you think it's working)
    • Documentation
    • Other
  • Documented source code
    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.)

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.

© 1998-2002 Dr. Christopher C. Taylor Office: CC-27C Phone: 277-7339 Last Updated: Thu Oct 24 15:35:17 2002
I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to.