3
$\begingroup$

The scenery is the following: I have a polygon in the space, defined (the polygon) from your vertices. By 3 vertices of the polygon (non-aligned) revenue equation of the plane containing the polygon. Later I have a ray of light, represented by the parametric equation of the line in the plane (the parameter is $\textstyle t $).

I must determine the intersection between the line and the plan and see if the point of intersection (if they line and plane are not parallel) is internal or external to the polygon.

Written the equation of the plan then, it's simple find the point of intersection: I replace the parameter values of $\textstyle x $ $\textstyle y $ and $\textstyle z $ of the line in the equation of the plane and from here I determine the value of the parameter t. Then I replace t in the parametric equation of the line, and I have the coordinates of the intersection point.

The text that I am following (3D COmputer Graphics) tells me that if I get from the calculation that $\textstyle t < 0 $ the point will stay in a part of plane that does not contain the polygon.

I did not understand why. Than intuitive-geometric meaning has $\textstyle t $?

I point that t <0 is sufficient but not necessary condition to say that the point does not belong to the polygon. If it isn't t <0 I'll have to explicitly test whether the point is inside the polygon or not but the book says that if t <0 I can avoid all this job because the point is certainly outside the polygon (in a part of the plan that the book calls half plane ). I would like to know why, what mean the parameter t.

$\endgroup$

1 Answer 1

2
$\begingroup$

The $t$ parameter represents the distance from the ray's origin point to the intersection point, as a multiple of the ray's direction vector. It is positive for intersections "in front" of the origin, negative for those "behind" the origin as judged by the direction vector.

In raytracing we always discard any intersections with $t < 0$, because we don't want to render objects behind the camera, and so forth. A ray is only half a line, and only the points $t \geq 0$ are part of the ray.

It is not correct to say "if $t<0$ the point will stay in a part of plane that does not contain the polygon". If the polygon is behind the ray origin, then the intersection point may well be inside the polygon. However, we can immediately discard this intersection due to its being located behind the ray origin, so we would not need to perform any further tests of whether the point on the plane is in fact inside the polygon.

$\endgroup$
2
  • $\begingroup$ I clarified a lot of things and I really appreciate your response. It remains a doubt, you correct me if I'm wrong or confirm: if t<0 the intersection point (plan and line) is surely behind the origin of light source but it can happen that the object is still in front but surely the object isn't crossed from the ray (because the intersection is behind) and not being illuminated can be eliminated. I'm a beginner in CG, forgive me if I say stupid things $\endgroup$
    – Nick
    Aug 25, 2016 at 23:50
  • 1
    $\begingroup$ @Umbert That's right. A plane and line (or ray) have at most a single point of intersection, and if that point is behind the ray origin, then no object in the plane can intersect the ray. $\endgroup$ Aug 26, 2016 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.