# spot light cone - plane intersection

This topic is 3631 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, Im trying to detect intersection between a cone of light and a plane. I think I'm almost there.. but am stuck at the last bit! Firstly, I do trivial rejection by performing a sphere test against the plane using cone centre and cone height to make the sphere. Secondly, I try to detect if the cone intersects the plane by working from the following diagram: http://img121.imagevenue.com/img.php?image=84152_cone_intersection_122_463lo.JPG (this is from a Dave Eberly book) I calculate d x (n x d) as: // inverted cone axis tVector4f InvertedAxis; InvertedAxis.Invert(c_rCone.GetAxis()); // perpedicular unit vector from cone along plane tVector4f w; w.CrossProduct(vNormal, InvertedAxis); w.Normalise(w); w.CrossProduct(InvertedAxis, w); w.Normalise(w); Then Theta (the top Theta in the diagram) (cos(Theta) = n . w) as: // angle from plane to cone const float32 c_fNdW = vNormal.DotProduct(w); const float32 c_fAngle = Math::Acos(c_fNdW); But at this point I get confused... The book now says: "If the intersection of the plane P and the axis of the cone is within the cone (i.e., the signed distance less than or equal to zero), then there is obviously an intersection. Otherwise, if Theta is less than or equal to α, then there is an intersection." I've also calculated I(a) in the diagram, by intersecting the cone axis with the plane, and know that I need this.. but am not sure how to apply it to solve the intersection test... Can anyone help? Thanks in advance, Hybrid [Edited by - Hybrid666 on August 14, 2008 3:11:21 PM]

Anyone? :(

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 10
• 14
• 30
• 13
• 11
• ### Forum Statistics

• Total Topics
631790
• Total Posts
3002365
×