CMPS 160 -- Lab Assignment 4
Due date:
Midnight, Friday, May 20, 2016
NO LATE SUBMISSIONS ACCEPTED
Objectives:
Add camera control.
Description
-
In addition to the requirements from previous labs and programs,
you will add functionality for camera control in this lab assignment.
Primarily, this includes camera movement, orientation, and parameters (fov).
-
20% of functionality: (zooming)
Allow the user to zoom in and out. This is achieved by modifying the fov
parameter in your perspective call. Map this scrolling of the middle mouse without
any mouse clicks.
-
20% of functionality: (pan the camera)
If the user left clicks on the background and moves the mouse,
it will move the camera horizontally and vertically on XY-plane of the
viewing coordinate frame.
The effect appears opposite to what you saw with object translation.
To distinguish between the two, panning the camera should affect only the specular lighting,
but not the diffuse lighting. While translating the object affects both
specular and diffuse lighting.
-
20% of functionality: (move camera in or out)
If the user clicks on the background with the middle mouse and scrolls the wheel,
it will move the camera in or out along the z-coordinate of the viewing coordinate frame.
If you have specular lighting turned on, you should see some difference
between this vs zooming in/out.
-
20% of functionality: (move objects in or out)
If the user clicks on an object with the middle mouse and scrolls the wheel,
it will move the selected object in or out along the z-coordinate of the world coordinate frame.
-
20% of functionality: (rotate the camera)
Full 3D rotations involve roll, pitch, and yaw
(e.g. from
point of view of pilot).
Here, you will add functionality for pitch and yaw only.
When the user right clicks on the background and moves the mouse,
vertical mouse movements are mapped to pitch and
horizontal mouse movements are mapped to yaw.
These are done with respect to the viewing coordinate frame.
Grading:
This program will form part of your CMPS 160L grade.
The header block should contain at least the following information:
name, cruzid, date, and brief description of your program.
This will be true for all future assignments and programs.
Rubric:
-20 mixing up camera vs object transformations
-10 inadequate documentation, description, etc.
-10 not following instruction
-?? missing functionality from previous assignment that are needed to show proper
operation of current requuirements.
please include a README file as necessary e.g. peculiar behaviors,
deviations from requirements, other notes to graders etc.
Who graded your assignment:
Joseph: aassi - dstansbe
John (Andy): dwmarx - kevylet
David: kmccotte - nmlamper
Daniel: nnakano - zpeterse
Submission:
Your lab assignment should be contained in two files: an index.html file and Camera.js. A README file can
be included if appropriate. Put both of these in a folder called lab4. Do not include any of the object
data files from the class repository. Zip up lab4 before submitting. Submission must be done using the
"submit" command from unix.ic.ucsc.edu
Submission must be done using the "submit" command.
- submit cmps160-ap.s16 lab4 lab4.zip
Last modified
Sunday, 22-May-2016 10:56:41 PDT.