Lecture: Triangles

How to 3D

Chapter 2: Triangles and Transformations

Lecture: Triangles

Dear students:

The games we play are generally not made of dots and lines. They are made of triangles. Today we start exploring triangles. Thanks to the versatility of vertex buffers, rendering them is not all that different than rendering other primitives. We'll also have a look at interpolating values across a triangle and moving our models around with transformations.

Lost Vertex

We often represent an ngon as a sequence of n vertices. But what if we lost one of them? Could we recover it? Perhaps if we know something more about the shape. We'll examine several different shapes and see how we might go about repairing them. If we can repair them, we'll build a little renderer that randomly generates broken instances and restores their lost vertex.

Suppose you know that the shape is an equilateral triangle. But you only have its first two vertices as you wind around its perimeter:

Can you compute the third? If so, write down an algorithm.

Silhouette

You read about quilting triangles together to form complex shapes. Let's do a little activity to revisit those ideas. Here's your challenge:

We'll take the drawing of one lucky student and turn it into a renderer.

Annulus

There are a couple of other big ideas you read about that we should explore together, especially interpolation and transformations. Let's explore them by reverse engineering this scene:

TODO

Here's your list of things to do before we meet next:

Get your lab video recorded and posted on Discord. Late labs are not accepted.
Complete the middle quiz as desired before Thursday.
Keep working on the first milestone.

See you next time.

Sincerely,

← RotateLab: Triangles →