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.

Main content

3. Calculate intersection point

Now we are ready to calculate an intersection point using our ray in parametric form and our line in slope-intercept form. Different values of a parameter t locate different points on the ray. The intersection point we're looking for is one such point, so there's a value of t, t*, that gives us the intersection point! How do solve for t*?

Want to join the conversation?

  • leaf red style avatar for user Juan Mendoza
    So a lot of people seem to feel lost in this as well huh
    (9 votes)
    Default Khan Academy avatar avatar for user
  • starky ultimate style avatar for user Alex Brown
    Does someone have a better explanation of what t* represents?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • primosaur tree style avatar for user Sean Murphy
      t* represents the weight in finding the weighted average of the points C and B. We can find the point of intersection of the ray and the line by finding the value of t* where R(t*)=I, or what weight in the weighted average of the points C and B gives us the point of intersection along the ray.
      (3 votes)
  • piceratops ultimate style avatar for user Skyrbunny
    Can someone please explain what variable does what?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Maxim
    What confuses me so far is that lines are well defined functions so we can 'easily' figure out any point along the line. However when creating a scene in a program the geometry isn't mathematically positioned, but rather arbitrarily. So would we have to subtract the vector of each triangle's position by the vector of the camera's position to figure out the length of the ray between them?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leafers tree style avatar for user quaid ocarroll
    what is t this is confusing
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf red style avatar for user Blaze
    So let's say we had a parametric equation in 5 dimensions. Would we have to write out
    Ie₀ = T(e₀)
    Ie₁ = T₁(e*)
    ...
    Ie₄ = T₄(e****)

    , or is there an easier way?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user hoopoothepinkielover
    OMG why is this so boring? I was having fun with this until I got to here, this lesson is not very interesting (To me at least.) I want it to be fun.
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Mike SIms

    - Now that you have a feel for how t works,

    we're ready to calculate our intersection point I

    between our ray CP and our line segment AB.

    Recall from the previous video that

    the slope intercept form of the line AB

    is y equals negative three x plus 11

    and the parametric representation of the ray CP

    is the function R of t equals one minus t

    times C plus t times P.

    Different values of the parameter t

    locate different points on the ray.

    The intersection point that we're after

    is one such point on the ray so there

    must be some value of t, call it t star,

    such that I equals R of t star.

    This is really two equations, one for the x-coordinate

    of I and one for the y-coordinate.

    These two equations are I sub x equals R sub x

    of t star, which equals one minus t star

    times C sub x plus t star times P sub x.

    In the same way I sub y equals R sub y of t star,

    which equals one minus t star times C sub y

    plus t star times P sub y.

    In this particular case C, our camera position,

    has coordinates zero, zero

    and P has coordinates two, 1/2.

    So we have I sub x equals t star times two

    and I sub y equals t star times 1/2.


    I is also on the line segment AB meaning that

    I satisfies the slope intercept form for AB,

    that is I sub y equals negative three

    times I sub x plus 11.

    So we have three equations and three unknowns,

    I sub x, I sub y and t star.

    We can solve the system of equations

    by substituting the first two equations

    into the third to get an equation just in t star.

    1/2 t star equals negative three

    times two times t star plus 11.

    Solve this for t star, then plug that value

    of t star into the first two equations

    to get I sub x and I sub y.

    And that's how it's done.

    Before we continue get some experience using this

    kind of parametric function in the next exercise.
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Mike SIms

    - Now that you have a feel for how t works,

    we're ready to calculate our intersection point I

    between our ray CP and our line segment AB.

    Recall from the previous video that

    the slope intercept form of the line AB

    is y equals negative three x plus 11

    and the parametric representation of the ray CP

    is the function R of t equals one minus t

    times C plus t times P.

    Different values of the parameter t

    locate different points on the ray.

    The intersection point that we're after

    is one such point on the ray so there

    must be some value of t, call it t star,

    such that I equals R of t star.

    This is really two equations, one for the x-coordinate

    of I and one for the y-coordinate.

    These two equations are I sub x equals R sub x

    of t star, which equals one minus t star

    times C sub x plus t star times P sub x.

    In the same way I sub y equals R sub y of t star,

    which equals one minus t star times C sub y

    plus t star times P sub y.

    In this particular case C, our camera position,

    has coordinates zero, zero

    and P has coordinates two, 1/2.

    So we have I sub x equals t star times two

    and I sub y equals t star times 1/2.


    I is also on the line segment AB meaning that

    I satisfies the slope intercept form for AB,

    that is I sub y equals negative three

    times I sub x plus 11.

    So we have three equations and three unknowns,

    I sub x, I sub y and t star.

    We can solve the system of equations

    by substituting the first two equations

    into the third to get an equation just in t star.

    1/2 t star equals negative three

    times two times t star plus 11.

    Solve this for t star, then plug that value

    of t star into the first two equations

    to get I sub x and I sub y.

    And that's how it's done.

    Before we continue get some experience using this

    kind of parametric function in the next exercise.
    (0 votes)
    Default Khan Academy avatar avatar for user

Video transcript

- Now that you have a feel for how t works, we're ready to calculate our intersection point I between our ray CP and our line segment AB. Recall from the previous video that the slope intercept form of the line AB is y equals negative three x plus 11 and the parametric representation of the ray CP is the function R of t equals one minus t times C plus t times P. Different values of the parameter t locate different points on the ray. The intersection point that we're after is one such point on the ray so there must be some value of t, call it t star, such that I equals R of t star. This is really two equations, one for the x-coordinate of I and one for the y-coordinate. These two equations are I sub x equals R sub x of t star, which equals one minus t star times C sub x plus t star times P sub x. In the same way I sub y equals R sub y of t star, which equals one minus t star times C sub y plus t star times P sub y. In this particular case C, our camera position, has coordinates zero, zero and P has coordinates two, 1/2. So we have I sub x equals t star times two and I sub y equals t star times 1/2. I is also on the line segment AB meaning that I satisfies the slope intercept form for AB, that is I sub y equals negative three times I sub x plus 11. So we have three equations and three unknowns, I sub x, I sub y and t star. We can solve the system of equations by substituting the first two equations into the third to get an equation just in t star. 1/2 t star equals negative three times two times t star plus 11. Solve this for t star, then plug that value of t star into the first two equations to get I sub x and I sub y. And that's how it's done. Before we continue get some experience using this kind of parametric function in the next exercise.