WB4: 0-Index: Transformation Math

Workbook 4 - Transformation Math

Last time, we learned about transformations and coordinate systems. We learned a few transformations (translate, scale and rotate), how to think about transformations as changes of coordinate systems, and some ways we use transformations (e.g., to build hierarchy or create convenient coordinate systems). This week we'll learn about how they work mathematically.

We'll start by looking at a notational reason why our math (or the math in a textbook) looks different than the code we write for the Canvas API. We'll then look at the general math for transformations as well as the special, simple case of linear transformations. Linear transformations are the most common case in graphics - and include all of the transformations we've discussed so far. Then we can dive into the math of linear transformations (although, the textbooks cover this well). As part of this, we'll look at a common graphics trick of using homogeneous coordinates which will allow us to represent translation as a linear transformation. When we get to 3D, this will let us do other things as well.

Also, as part of this workbook, we'll experiment with a fun animation technique as a way to practice vector algebra.

This workbook has less code than normal - but we'll make up for that on the last page. The HTML is unimportant - don't worry about trying to read it.

Page 4 has required exercises on it. And Page 6 has a non-trivial programming exercise. But feel free to tinker with the code on other pages as a way to understand how the examples work.

Don't forget about the README.md and QUESTIONS.md. And to commit and push to GitHub!

Required Reading

Tutorials: If you still haven't read the Tutorial: Points, Vectors, Coordinates, now might be a good time.

Textbook: The math of transformations is covered well in the graphics textbooks. You are required to read Sections 6.1, 6.3, 6.4 and 6.5 of Fundamentals of Computer Graphics (Shirley et al.) FCG4_Ch06.pdf (although, 6.1.6 is a more advanced topic that we won't discuss in class, and the 3D parts, including 6.2 we'll come back to later). You are also required to read Chapter 5 of "The Big Fun Graphics Book" (Hart) Hart05-jan19.pdf - which covers the same material. It is important enough that you should see it twice, and each one adds extra details.

However, you might want to start reading through the workbook first - it will set up the connection to the textbook chapters.

Optional: If you want a refresher on linear algebra, you may want to look at Chapters 1, 2 and 4 of Practical Linear Algebra. The book is discussed on the Books page, and you can find it online at the UW Library ((Practical Linear Algebra-UW)). We have put Chapters 1, 2 and 4 in Canvas (pla_chapter_1.pdf, pla_chapter_2.pdf, pla_chapter_4.pdf).

Warning: In class, we will be moving on to talk about shape representations, so you may want to read ahead a little bit. Next weeks readings will include Section 8.1 of Fundamentals of Computer Graphics FCG4_Ch08.pdf, and Chapter 15 FCG4_Ch15.pdf (although we won't be doing everything in Chapter 15).

Get Started!

Don't forget to commit and push as you work!

Get started on page one.