2. Parametric form of a ray

Learn this with friends

MathsPrecalculus (Eureka Math/EngageNY)3:033 check-ins

About this video

With A = (3, 2), B = (4, -1) and P = (2, 1/2), the video writes line AB as y = -3x + 11 and ray CP as y = 1/4 x, then finds the intersection I by solving the two equations together. Because rays in 3D have no slope-intercept form, it replaces this with a parametric function R(t) = (1 - t)C + tP, a weighted average of C and P where t = 0 gives C, t = 1 gives P, and t > 1 gives points beyond P.

You'll be able to

  • write the slope-intercept form of a line through two points.
  • find an intersection point by solving two line equations together.
  • use R(t) = (1 - t)C + tP to find points on a ray for different values of t.

Key words

Slope intercept form
Writing a line as y = mx + b, where m is the slope and b is where it crosses the y-axis.
Parametric function
A function that gives the points on a line or ray using a single changing number, the parameter t.
Weighted average
An average where each value is multiplied by a weight that says how much it counts.
Parameter
The input number t that picks out one point on the ray.
Transcript

- Recall that to figure out where a two-dimensional ray intersects a line segment, we started by first introducing a coordinate system. Once we have our coordinate system, we can write our line AB in slope intercept form. Since in this example A has coordinates three two, and B has coordinates four negative one, the slope intercept form of AB is y equals negative three x plus 11.

Similarly, if I pick P to have coordinates two, one half, then the slope intercept form of the ray CP is y equals one quarter x. The point I we're looking for is on both of these lines. So if I sub x and I sub y represent the coordinates of I, then I sub y equals negative three I sub x plus eleven, because I lies on AB.

And I sub y equals one quarter I sub x, because I lies on the ray CP. Solving these two equations for the two unknowns gives us the coordinates I sub x and I sub y. Using the slope intercept form of the ray works in two dimensions, and is fairly simple to understand, but there's a problem when we generalize it to three dimensions.

The problem is that in three dimensions, the ray doesn't have a slope intercept form. So we'll have to throw out this representation of our ray in preparation for three dimensional raytracing. To represent our ray CP, we'll use something called a parametric function.

What I'm about to write looks a little strange at first, but bear with me, these functions start to become familiar with practice. My ray will be represented by a new function, R of t, that is the weighted average of C and P, where t is the weight. In particular, I'm going to write R of t as one minus t times C, plus t times P.

Notice what happens when t equals zero. One minus t is just one. So R of zero is C. And when t equals one, R of one equals P. That's convenient, because I can relabel C as R of zero, and I can relabel P as R of one. R of one half would be exactly halfway between C and P.

Values of t greater than one name points on the ray off in the scene beyond P. Before we continue, get some experience using this kind of parametric function in the next exercise.

Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.