Project 2b
©Jorg Peters
Points: 25+10 (+10 +5 BONUS)
Purpose
Learn hierarchical transformations and lighting
Task 4: Keyboard interaction
Points: 5+5+5+10
Moving the robot arm:
- Base (translate): Select the base for translation
with key t. The whole model should
slide on the XZ plane according to the arrow keys.
-
Base (rotate): Select the base using key
r. The base, joint and arms should
rotate about the Y direction when pressing
the left or right arrow keys (J1).
-
Arm1: Select arm1 using key
1. The arm
(and the other connected arm) should rotate up
and down when using the arrow keys (one
end is fixed at the center of the red base (J2).
- Arm2: Select Arm2 using key
2. The arm should rotate up
and down when using the arrow keys (one end is fixed at the center
of the joint) (J3).
Indicate the selected part by drawing it in a brighter color.
Task 5: Light up the scene
Points: 10
Add two lights to the scene.
For each light, supply position, diffuse color, ambient color
and specular color.
Position the lights near the camera so that one light comes from
the left and another one from the right.
You are free to choose any light colors and positions as long
as the scene looks good.
Set diffuse and ambient material of the objects to the color of the object.
Set specular as a multiple (eg one tenth) of the diffuse color.
BONUS: Teleporting
Points: 10
When s is pressed
have a Platonic solid exit the tip of Arm2
with tangent equal to Arm2 and derivative
in length equal to the length of Arm2.
The solid follows an arc according to Newton's law under gravity
until it hits the grid.
Animate the projectile and, on impact,
move the robot arm to the impact location.
BONUS: Picking
Points: 5
Implement picking for selecting the parts of the robot arm. You amy find the picking tutorial helpful.
WHAT TO SUBMIT
- Your modified source files
(cpp, shader, html, obj, as appropriate)
Filepaths to load models must be relative to the source directory
(no absolute paths specific to your PC)
- A link to a screen capture of your
running program showcasing the implementation
of all of the tasks using
recordit (Mac, Win)
or similar software.
List tasks in order and demonstrate or state that you did not implement
(and briefly why).
(no absolute paths specific to your computer).