Purpose
Learn hierarchical transformations and lighting.
Task 4: Keyboard Interaction (25 points)
Use keyboard interaction to move and rotate the robot arm. Indicate the selected part by drawing it in a brighter color.
- 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).
- Arm 1: Select Arm 1 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).
- Arm 2: Select Arm 2 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).
Task 5: Light Up the Scene (10 points)
- 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 comes from the right.
- You are free to choose any light colors and positions as long as the scene looks good.
- Set the diffuse and ambient material of the objects to the color of the object. Set specular as a multiple (for example, one tenth) of the diffuse color.
Task 6: Teleporting (10 points)
- When S is pressed, have a Platonic solid exit the tip of Arm 2 with tangent equal to Arm 2 and derivative in length equal to the length of Arm 2.
- 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 (5 bonus points)
Implement picking for selecting the parts of the robot arm. You may find the OpenGL picking tutorial helpful.
Bonus: Reaching (10 bonus points)
Allow a user to generate a mark on the grid (by navigating with j,k,i,m). Apply inverse dynamics so place the arms (not the body) in such aposition that pressing S has the solid hit the marked grid point.
What to Submit
-
As separate submission entries
- Your modified source files (CPP, shader, HTML, OBJ, as appropriate)as a zip file. File paths to load models must be relative to the source directory; do not use absolute paths specific to your computer.
- A link to a screen capture of your running program showcasing the implementation of all tasks using Recordit (Mac, Windows) or similar software. List the tasks in order and demonstrate each one, or state that you did not implement it and briefly explain why.
- A short document (pdf or doc) summarizing what difficulties encountered and how, if any, AI was used (eg prompts to and name of AI)