Ready to dive into some math?

In this lesson we are going to explore the most fundamental calculation a ray tracer performs: ray object intersection.

Since objects in our scenes are modeled using millions of tiny triangles, each intersection is betweena ray and a triangle.
In this lesson we'll start with the a simpler version of this problem, the intersection of a ray and a line in 2D:
Finally we'll extend these ideas from two dimensions to work in three dimensions. By the end of this lesson we'll need to solve a pretty meaty system of equations with 4 unknowns:
Sound like fun? By the end of this lesson you can say you have a basic understanding of ray tracing along with a mathematical view of the underlying geometry which makes it all work. How cool is that?

What do I need to know before starting?

  • You should be familiar with the slope-intercept form of a line. Click here to review a video or click here to do an exercise
  • We'll also be using the parametric form which requires you understand weighted averages of two points. We covered weighted averages of two points in the Environment Modeling lesson.
  • Finally we'll need weighted averages of three points which we covered in the Character Modeling lesson.
  • You should also have experience solving systems of equations.
Okay, you're ready to go!