Project 1a

Computer Graphics (CAP 5705) · 35 points · © Jorg Peters

Purpose

Learn how to use affine transformations to position objects in 3-space.

Resources

Set Up

Task 1: Grid (5 points)

Perspective view of an integer grid on the horizontal Y equals zero plane. The grid is centered at the origin, with the positive X axis shown in red, the positive Y axis shown vertically in green, and the positive Z axis shown in blue.
Example view of the 3D grid and coordinate axes.

Draw an integer grid on the Y = 0 plane for the rectangle from (-5, 0, -5) to (+5, 0, +5).

Draw the positive portion of each axis, with length 5:

  • X axis: red
  • Y axis: green
  • Z axis: blue

Task 2: Camera Rotations (5 points)

Camera orbit around a 3D scene A central origin is surrounded by a blue equatorial orbit and a red orbit perpendicular to it. A camera marker sits on the blue orbit and points toward the origin. camera blue equatorial orbit red orthogonal orbit origin
Camera-orbit illustration: the blue circle is parallel to the equator; the red circle is orthogonal to it.
  • Use perspective projection.
  • Place the camera so that you can see the whole scene. Use glm::LookAt to generate the View matrix.
  • Press C to select the camera.
  • Use and to move the camera along the blue circle parallel to the equator.
  • Use and to rotate the camera along the red circle orthogonal to the equator.
  • Choose the up direction so the camera always points to the origin.
Camera looking toward the origin A camera position is shown above and to the right of the origin. An arrow from the camera points toward the origin, illustrating the viewing direction and the requirement that the camera continually point at the origin. origin camera look-at direction up
Camera viewing direction toward the origin and an up direction.

Task 3: Draw the Robot Arm (25 points)

Photograph of a three-joint robotic arm with curved arrows indicating rotations J1, J2, and J3 at the base, first arm joint, and second arm joint.
Reference illustration showing the three rotational joints J1, J2, and J3.
Three-dimensional robot-arm model in a Blender viewport. A large polygonal base supports a rectangular first arm, a polygonal joint, and a cylindrical second arm.
Example 3D robot-arm model.

The robot arm consists of the following parts:

  • Base: truncated tetrahedron placed on the X–Z plane.
  • Arm 1: rectangular box emanating from and hinged at the center of the base.
  • Joint: dodecahedron of appropriate radius at the other end of Arm 1.
  • Arm 2: cylinder connected to the center of the joint.

Geometry and models

What to Submit

  1. Your modified source files — CPP, shader, HTML, OBJ, as appropriate. File paths used to load models must be relative to the source directory; do not use absolute paths specific to your computer.
  2. A link to a screen capture of your running program showcasing the implementation of all tasks, using Recordit or a similar screen-recording tool. List the tasks in order and demonstrate each task, or state that you did not implement it and briefly explain why.