Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

intersection between two cones

Asked by Doctor61 on 7 Feb 2013

I have two circles with centre coordinates c1(x1,y1,z1) and c2(x2,y2,z2) and their radii r1 and r2, respectively.Both of the circles so that the normals to their planes pass through origin.

Now if you consider two cones with the vertex at origin and the circles as the base, how can I determine if there is an intersection between these cones in Matlab?

Note that I do not need to find the shape or coordinates of these intersections at this point, only checking if there is any intersection between these two coins.

I tried different methods, eg. try to rescale one of the circles to the same distance from origin as the other one and check if there is any intersection between the two circles. I got stuck somewhere in the way and could not proceed. I have also thought of using the concept of solid angle, but didn't get me anywhere.

Please help, I am desperate here.

0 Comments

Doctor61

Products

No products are associated with this question.

1 Answer

Answer by Thorsten on 7 Feb 2013

Two circles intersect if their distance is smaller than the sum of their radii

   sqrt((x1 - x2)^2 + (y1 - y2)^2)) < r1 + r2

If the z values of the circles are both positive or both negative,

   z1 * z2 > 0

the corresponding cones will intersect.

0 Comments

Thorsten

Contact us