Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Intersection between two cones
Replies: 6   Last Post: Feb 7, 2013 4:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bruno Luong

Posts: 8,742
Registered: 7/26/08
Re: Intersection between two cones
Posted: Feb 7, 2013 3:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Doctor61" wrote in message <kevm5s$fnm$1@newscl01ah.mathworks.com>...

>
> I have actually thought about something like what you described, but I don't know how to implement it in matlab. I thought I can find the two circles at the same distance from origin and see if they have intersections. But I don't know how to do that. Based on what I have found so far, if t is the parameter then any point P on the circle is given by:
> P=Rcos(t)u? +Rsin(t)n? ×u? +c
> Where u is a unit vector from the centre of the circle to any point on the circumference; R is the radius; n is a unit vector perpendicular to the plane and c is the centre of the circle.
>
> So if I have u1,n1,c1 and u2,n2 and c2, then how can I find the intersection?


Let's assume the 2D circle (after projection on a plane) is centered at 0.
Let's work on (x,y) plane. The circle is radius R
You can rotate the coordinates in such way that the line is parallel to y-axis: { x = x0, y arbitrary }.
x0 is the distance of the line to circle center.

The intersection is
x = x0
y = sin(+/-acos(x0/R)) = +- R * sqrt(1 - (x0/R)^2)

If |x0| > |R| there is no intersection.

Just rotate back after finding a solution.

Bruno



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.