2
votes

I have an Infinite Plane and I know its Normal and Offset. Now, I want to know if a Ray Casting ray is intersecting with this Infinite Plane.

How can I know that?

1

1 Answers

3
votes

Let the ray be described as a+λ∙b, i.e. starting at point a and going in direction b. Let the plane be described as nx=d, i.e. the set of points x which have the same offset d, measured in direction of n.

Now simply plug one into the other:
n∙(a+λ∙b) = d
na+λ∙nb = d
λ∙nb = dna
λ = (dna)/(nb)

If the λ computed in this fashion is positive, then the ray will intersect the plane.