CS40: Computer Graphics, Lab 4 
     2D Manipulations 
     By Jeff Kaufman 
    In this lab I extended the graphics library I started in 
    lab 2.  Most of these extentions were
    related to adding two dimensional rotation, translation, and
    scaling, and involved implementation of a simple matrix math
    libray.
    
    Professor Maxwell's Enterprise, at a rotation of 305 degrees
    firing phasers at a cloaked Klingon bird of prey 40 degrees to
    port:
   
    
   
   A movie of the Enterprise futilely firing phasers at the
   sun and going to warp.
   
   
   The model of the Enterprise above is made by scaling, rotating, and
   translating the unit square and the unit circle into pretty
   formations.  My unit circle is not drawn with my circle drawing
   algorithm and instead is a 32 vertex polygon because I wanted the
   ship to be able to stretch properly when going to warp at any
   angle.
  
   
API Info
    The basic API is presented in the 
    graphics specification for the lab.  I wrote in C, and so
    implemented the C portion of the spec, extending the
    portions I wrote last week.  I did not write any addtional
    functions for this week.
   Lab Questions
   
     - For this lab, as with previous labs, I worked alone.
     
- The global transformation matrix is currently hardcoded
         to be the identity matrix, but if I wanted to do something
         with it I would just need to edit and recompile.  If I wanted
         to do much I would likely make it depend on some command line
         parameters.
     
- The viewing transformations were designed to be hand edited
         for each image created; not really ideal.
     
- The command line arguments were mostly created in the order I
         needed them. 
         They are messy and would be frustrating to work with for
         anything more complicated than the movie above, especially
         if I did not have bash to be helpful and script
         the changing parameters.  I mostly didn't worry much about
         this because I want to completely re-write the pipleline
         for lab 5 and this is going to be scrapped then.
     
- The only extensions I did this week were the phasers and
         warp-stretching on my Enterprise and the movie creation.
         The anti-aliasing from previous weeks is still working. 
  
 Jeff Kaufman : 2006
 cbr at sccs
      dot swarthmore dot spam edu.  Remove spam.
main page