CPSC 424 Computer Graphics Fall 2025

CPSC 424 Lab 1: Transformations

Due: Tue 9/9 at the start of lab

This lab is about one of the fundamentals of computer graphics — transformations.

Successful completion of this lab means that you:

Collaboration and Use of AI

You can play the transformation game alone or team up with one other person to solve the puzzles.

No AI.

Handin

Hand in a hard copy of your answers for the transformation game. (List the transformation(s) required to solve each of the 20 levels, writing the transformations in the same left-to-right order as they appear in the transformation chain in the game.) Only one handin per group is needed. (Be sure to include the names of everyone in the group.)


Transformation Game

Transformations such as translation, rotation, and scaling are at the heart of the viewing pipeline. In this assignment, you'll play a game of sorts in which you'll build up series of transformations to achieve particular goals. The purpose of this task is to become familiar with the effects of these three core transformations and to gain an understanding of how the order in which transformations are applied affects the outcome.

The transformation game software comes from the Brown University Exploratories project. For more information on exploratories see the Exploratories home page.

Open a terminal window and run the game with the commandline

  java -jar /classes/cs424/lab1/transformation_game.jar

The following directions are taken from the transformation game description page:

The goal of this applet is to move the house (originally located at the origin of the play space) using individual transformation blocks so that it matches the darker destination house which is also located in the play space. When a match is detected by the program, the house will flash and a sound will be played. Move through individual challenges (of increasing levels of difficulty) by clicking on the Prev and Next buttons in the lower portion of the screen. There are currently twenty levels available.

The small puzzle-like pieces on the right side of the area represent individual transformation blocks (T = Translation, S = Scale, R = Rotation). Drag individual transformation blocks to the transformation chain area in the lower portion of the screen. The currently active transformation block is highlighted. When multiple blocks are present in the transformation chain, click on a block to activate it. When a transformation block is active, clicking and dragging the house in the central play area changes the parameters of the transformation (i.e., click and drag the house to translate it when a translation block is active). A transformation block whose legend includes a small asterisk indicates that the transformation will be animated by the program.

Note that while the transformations in a chain are shown from left to right, they are actually applied from right to left. For example, for a two-transformation chain

    R 20 deg, T X: -75
  
the translation is applied to the house first, then the rotation is applied to the translated house. This might seem backwards, but when transformations are representated by matrices, it corresponds to the order of matrix multiplications. (Matrix multiplication is not commutative, so the order of multiplications matters.)

Note that the applet has a couple of bugs, but you can work around them:

Aim for an exact match, but it's OK if you are close. For example, if the correct solution is T X: 100, T X: 102 is OK.