Week 1 Tutorial

Question 1: Introduction

Go around the class, introduce yourselves 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: java concepts

Question 3: Data layout

The Point2DBuffer class represents a buffer of points with a java.nio.FloatBuffer.
public class Point2DBuffer {

    private FloatBuffer floatBuffer;

    private int capacity;

    ...
What's the difference between a FloatBuffer and an array of floats (float[])?

What is the layout of the points in the FloatBuffer?

Question 4: Drawing some triangles

The Triangle2D class allows you to create a triangle with a list of 3 points. Write a subclass of Application2D that produces the following image of two black triangles on a yellow background.

Question 4: Triangle strips

In additional to triangle fans, OpenGL also supports triangle strips. Triangle strips are drawn by drawing a triangle between each vertex and the two previous vertices.

How might you represent a 'U' shape like the one below with a triangle strip?

Question 5: lab Discussion

How did you go with the lab? Did you get it finished? Do you have any questions about it?