How to determine if two cones with vertices at origin, intersect?
Mostrar comentarios más antiguos
Suppose I have two different sets of data points in 3d, that each are in a different tilted plane (different theta,phi,r of normal). I manage to find the enclosing circle for each of these sets of points (center and radius). Now imagine a solid angle (cone) with the vertex at origin and base at the enclosing circle. So I have two cones that have different heights, and their middle axis is at a different theta and phi. Now how can I figure out if these cones have any overlap (intersection) or not? And also if they are not overlapping how close are they, this is rather complicated to define and I still haven't figured out a suitable proximity measure. But maybe you guys out there have some ideas?
1 comentario
EDIT: discard this comment; I wrote it before realizing that your cones have both their tip at the origin.
You will probably find a lib. that does it, but if you had to do it "by hand".. you could start by computing the distance between the axes of both cones. This is done by computing the scalar product between a vector made of two arbitrary points from the two axes respectively and a unit vector orthogonal to the two axes. You get the latter by normalizing the cross product between two arbitrary directional vectors defining the two axes.
It would not be too complicated then to find radii of both solid angles at closest locations between the two axes. However, what you call "overlapping" is vague. If the two cones have an intersect, its geometry will be quite complicated.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!