You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 9: Raytracing (20)
Carpetfizz

Why do we want to solve for t? I know it represents the amount the ray travels from the origin to intersect the plane, but why is this a useful quantity?

EDIT: Upon further thought: If t is not positive or real, then the ray does not intersect with the plane.

ricli

The slide explaining the ray equation states that the t variable represents time. Intuitively this makes sense because the larger t is the further away you get from the origin point. In the context of checking for intersection if t is infinity the ray will never intersect with the plane, if t is negative then the ray is pointing in opposite direction of the plane but a t within the range specified means the ray will intersect with the plane after a certain distance that t helps to show.

Staffpsmanohar

Also, if you know tt then you can compute r(t)\mathbf{r}(t) which is the point where the ray intersects the plane.

mishywangiepie

Using the equation on the left, I think if the origin is on the plane and if the ray lies completely on the plane both return t = 0. Is there a way to differentiate between these two cases?

Jordanwyli

@mishywangiepie, well if the ray lies completely on the plane, which means it's parallel to the plane, then we should be able to see that for any t, the dot product is 0. In which case, we will know that the ray lies completely in the plane.

Jordanwyli

[deleted]

aliceshan

To differentiate between the two cases when d * N = 0 (i.e. whether the ray is parallel to the plane but never intersects, or the ray actually lies on the line), maybe we can test by projecting the ray origin o onto the plane. If the projected point is equal to o, then we know that o lies on the plane?

jgforsberg

I believe t is not defined when the ray is parallel to the plane so dN = 0 and solving for t requires dividing by zero. Couldn't we just check if Nd = 0 as that is true iff the ray is parallel to the plane. Then t is either the empty set of all real nonegative numbers.

go-lauren

Bouncing of previous suggestions, to check what happens if r(t) is parallel to the plane, it is better to just check the dot product of d and N. If it is 0, then we can check if (o - p)' = 0. If it is, then r(t) has infinite solutions (on the plane), otherwise, it must be parallel. This directly comes from the reasoning that a plane is all p such that (p - p') * N = 0

jchen12197

When I thought of t as "time", I was a little confused about how it could ever be negative. However, if you think about t as the distance from the origin in the direction of d, it makes sense that if d was pointing away from the plane, t would have to be negative to get to a point on the plane.

You must be enrolled in the course to comment