CompSci 344
Spring 2015
Computer Graphics

Hierarchy Homework

Create a folder within your homework project on GitHub named 02_hierarchy. Your submission must

You may use any medium with which you feel comfortable to complete your work. In the past, people have written programs, used applications such as Mathematica or Matlab, or formatters such Microsoft Word or LaTEX, or even written it out long hand and taken pictures of it. However, you should submit only code, plain text, HTML, or PDF, and possibly image (gif, jpeg, or png) files. You are responsible for converting it into one of those standard formats (most current programs can save or print files to a variety of alternate formats).

Whatever means you use to derive answers to the questions below, your submitted work must show all yours steps to getting to the answer, not simply the final result.

Problems

Suppose you are trying to model a flower from the following objects. Each ellipse is an instance of the unit circle, transformed by a different 2D affine transformation.

In the following problems, as closely as possible, the major/minor diameters of each ellipse, as well as the center points have integer or half-integer coordinates and lengths. The petals are evenly arranged around the flower at mulitples of 72 degrees (or 2 * PI/5).


  1. For each of the five objects marked with a dot, derive the 3x3 transformation matrix. Assume each begins as a unit circle at the origin. The right image shows the world coordinate system.

  2. For this problem, precisely describe each of the transformations in words -- for example, "nonuniform scale by 5 in x and 2 in y" or "rotation by 45 degrees about point (1, 2)."

    One leaf and one petal are marked with a white dot. Express their transformations as:

    1. a sequence of translations, rotations about the origin, and nonuniform scales on the canonical x- and y-axes.
    2. a single nonuniform scale with respect to an arbitrary center and axis.

This drawing can also be expressed in a more structured way, as a set of grouped and transformed instances of the unit circle according to the following scene graph. In the diagram below, Petal 1 is the center petal (marked with a white circle in the diagram above), Petal 2 is the next petal in counter-clockwise order (marked with a black circle in the diagram above), and Petal 3 is the next petal in counter-clockwise order (not marked with a circle on the left side of the diagram above).

Each edge of this graph is associated with a transformation.

  1. Each transformation I is an identity. Describe transformations A, . . . , G as you did in problem 2a (using words).

    You can cross-check against your problem 1 answers by multiplying the matrices along any of the "Plant"-"Unit Circle" paths.
    For example, the final transformation matrix for "Stem" is the product: I A