Intersection of Two Circles Matlab Help

Intersection of Two Circles

We want to find the intersection points of two circles. The first circle has a radius of 2 and is centered at x= 3, y = 5. The second circle has a radius b and is centered at x = 5,
y = 3. See Figure 10.2-1.
(a) Find the (x, y) coordinates of the intersection points in terms of the patameter b.
(b) Evaluate the solution for the case where b = /3. .
Solution
(a) The intersection points are found from the solutions of the two equations for the circles. These equations are
The session to solve these equations follows. Note that the result x: [2xl sym 1 indicates that there are two solutions for x. Similarly, there are two solutions for y.
»syms x y b
»8 = solve((x-3)A2+(y-5)A2-4. (X-5)A2+(y-3)A2-bA2)

Capture

S
X: [2xl sym]
y: [2xl sym]
»S.x
ans
9/2-1/8*bA2+1/8*(-16+24*bA2-bA4)A(1/2)] 9/2-1/8*bA2-1/8*(-16+24*bA2-bA4)A(1/2)]
The solution for the x coordinates of the intersection points is The solution for the y coordinates can be found in a similar way by typing S. y. (b) Continue the session by substituting b = -./3 into the expression for x.
»subs(S.x,b,sqrt(3))
ans
4.9820
3.2680
Thus the x coordinates of the two intersection points are x = 4.982 and x = 3. The y coordinates can be found in a similar way.

Posted on July 24, 2015 in Symbolic Processing with MATLAB

Share the Story

Back to Top
Share This