Visualization, Spring'98, Yap

HOMEWORK 1:
ADDITIONAL NOTES

USER ROTATION SPECIFICATION
-- Above we suggested that to implement user rotations, you interprete an (x,y) mouse position as a point (x,y,1) in the global coords. This allows the user to choose any axis of rotation you want EXCEPT the z-axis!
-- But a more general solution is to allow the user to choose any constant H instead of 1. E.g., if H=100, then you view the point (x,y) as (x,y,100).
-- Changing H amounts to changing the sensitivity of your rotation specification.
-- In that case, setting the constant H=0 will allow you to rotate about the z-axis as well.
HOW TO ACHIEVE CONTINUOUS ROTATIONS There are basically two approaches:
  1. Maintain the current spin angles along the x-, y- and z-axes. Let these angles be Ax, Ay, Az. Treat each additional rotation request as specifying increments (dx, dy, dz) to these 3 angles. Hence you update the angle to
    Ax =+ dx, Ay =+ dy, Az =+ dz.
  2. The other method to keep a "cumulative rotation matrix" called "R_cum". When the user specifies a new rotation matrix "R_cur" (the current rotation), then we update R_cum as follows:
    R_cum = R_cur * R_cum
    Note the order of the the multiplication! Many of your solutions are wrong because it inverts this order. You can use the matrix facilities of OpenGL in a tricky way to store and update R_cum this way.
    HOW do you use this matrix? Let M_0 be the initial model view matrix. Then the updated model view matrix should be
    M_0 * R_cum
Date: Wed, 18 Feb 1998 16:28:22 -0500 (EST)
From: Chen Li 
To: g22_3033_002_sp98@cs.nyu.edu
Subject: light/color probelm in hw1
MIME-Version: 1.0

Some students found that when lighting is enabled, the colors associated
with objects (set by glColor*()) disappear. That is because that when
lighting is enabled, the color is computed from the light/material
parameters in the light model.  One way to color the cube with light on is
to assign the proper Material attributes to objects.

-- Chen Li
	
Date: Thu, 19 Feb 1998 11:43:05 -0500 (EST)
From: Xiaoliang Qian 
Subject: homework1

Group Members: Xiaoliang Qian, Jian Tan

Some tips and lessons learned:
1. Set idle function to NULL when pressing the mouse and tracking.
By doing so, you can let the object moving with your mouse.
2. I drew two bitmaps for the buttons, one for the ON status and one for the
OFF status. When I drew the button, I put two extra short lines along the
bottom and right side, so it looks the square is above the plane, which
stands for OFF. I also put two extra short lines along the top and left
side of the square for the second bitmap.so it looks the square is below
the plane,which stands for ON.