Week 3 Tutorial

This week's tutorial will be in the normal classrooms rather than the lab.

Question 1:

Go around the class and talk about why you're interested in graphics. What's the coolest graphics application you have seen? What would you like to be able to make?

Question 2:

Suppose we perform the following sequence of 2d transformations in jogl.Draw the successive coordinate frames:

Draw a house in the resulting coordinate frame, assuming that the house was located in the following starting position.

How does the result change if you change the order of the transformations (try all 6 possiblities).

Question 3:

Given a function

//This function draws a pole of width 0.1, height 2
//With the bottom, middle of the pole at the origin 
//of its local coordinate system as shown in the following picture.
private void drawPole(GL2 gl);

And another function

//This function draws a windmill vane with the left most point at the 
//origin of its local coordinate frame as shown in the following picture
private void drawVane(GL2 gl);
  1. Write a function called

    public void drawWindmill(GL2 gl);
    
    that can draw a windmill as shown in the following picture

  2. Write a function named

    public void drawWindmills(GL2 gl);
    

    that draws windwills as shown in the following picture. Note: This picture shows the world coordinate frame. You should use the previous function you just wrote to do so.

  3. Draw a scene graph that could model this simple scene.

  4. How could we make our vanes rotate?

Question 4:

Consider building a model of the solar system. What would the scene graph look like? What is the local coordinate frame for each object? How would they evolve over time? Careful, this is not as obvious at it might look.

Question 5:

Consider the world shown below, in world coordinates.

  1. An orthographic camera with bounds (left = -1, right = 1, bottom = -1, top = 1) is placed at (2, 3).

  2. What if you placed it at (2,3),rotated the camera by 90 degrees then scale it by (2, 2).

  3. Suppose the viewport is an 800x600 screen.

If there is any time left over talk about the assignment