If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Pixar in a Box

### Course: Pixar in a Box>Unit 15

Lesson 2: Mathematics of rendering

# Start here!

Overview of this lesson

## 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.

## Want to join the conversation?

• How exactly to the pixels turn into a picture/drawing?
• Because our eyes don't have unlimited resolution, our brain will merge the pixels together into a picture. If you look closely at a computer screen, you will see that it is made out of dots which are the pixels
• I have a question about the rendering equation. I haven't officially learned about integrals yet, but I've only seen integrals with nothing on the top or bottom, or with something on both the top and bottom. What does it mean when there is only something on the bottom. Also, for each direction, there is a separate point and a separate direction to that point. Yet there is only one variable for that point (`yi` in the source I used) and one variable for the direction (`wi` in the source I used). If you looped through "all" the possible directions, then you could calculate each of those vectors, but how does it work in the integral since there is only one of each?
• The something on the bottom refers to which variable to use for that integral. You always go from inside to outside.
• is there a subject for pixar in a box that doesnt require 103857395938th grade math?
• This kind of so-called high level math isn't actually hard; schools just teach math slowly. Any first-grader with a good grasp of arithmetic can learn Algebra I on their own if they try hard enough. Khan Academy happens to be an excellent place to do this.