Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Cone sphere intersection

  1. Nov 8, 2008 #1
    I am looking to test detect if a cone (described by an apex, angle theta and axis) and a sphere (defined by a sphere centre and a radius) intersect.

    Please see here for a complete description (because i can't post the code here):


    I am having trouble doing a simple test using this algorithm at the bottom of the link, which brings into question either the code or the validity of the math principles used. Intersections and Misses of the cone and sphere detections aren't consistent. Any advice on what is wrong with the math or the code?
  2. jcsd
  3. Nov 12, 2008 #2
    I've narrowed down the problem to looking for the closest point on the cone, to the sphere's centre (most likely a perpendicular distance away). The sphere's centre could be inside or outside the cone, hence the radius is the key to knowing whether there is an intersection or not. I've performed a test which allows me to do this, so now i need some help on getting the closest point.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?