Results 1 to 2 of 2

Thread: Cone intersect

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2000

    Cone intersect


    I have a bit of math problem,

    I have a list of points (3d) and a cone, I want to be able to count (quickly) how many of these points are 'inside' the cone.

    Can anyone help?


  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Fargo, ND

    Re: Cone intersect

    This might not be the most efficient manner, but here's one way you could do it.

    First of all determine the bounding box of the cone. Use that to weed out any points that are obviously nowhere near the cone. You could also do the same thing by using a sphere that encompasses the whole cone.

    Next, you check any points that are inside the bounding box/sphere to see if they are inside the cone.

    Assuming your cone is standing up straight (i.e. the tip is pointing up or down the Y-axis), one way to do this might be to determine at what "height" in the cone that point is, then determine the radius of the cone at that height. Then just determine if the point is within that radius. The cone wouldn't necessarily have to be oriented in any certain way to do this, but if it's tilted from any of the axes you'd have to determine the plane that intersects the cone and the point.

    Actually, even with a tilted cone you might be able to find the ellipse that a horizontal plane intersecting with the cone creates, but my calculus is a bit rusty so I wouldn't know how to determine that offhand.
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. Intersect a cube with a cylinder
    By zappian in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-13-2015, 03:55 PM
  2. Replies: 7
    Last Post: 01-05-2013, 10:50 AM
  3. Ray intersect surface
    By Irena in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-12-2010, 09:51 AM
  4. fast cone-cone-intersection
    By satan in forum OpenGL: General
    Replies: 2
    Last Post: 02-28-2006, 10:46 AM
  5. if 2 lines intersect each other?
    By beginner620824 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-20-2003, 05:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean