How to find the (x,y) coordinate of an intersection value
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
For the intersection value aijk, how do I find the (x,y) coordinate in PCi, PCj, and PCk (circle powers for i, j, and k respectively) that produce PCi=PCj=PCk (the value aijk)? Circle Power For 3 intersecting circles as in the plot, the Circle power will be at the point of intersection of all 3 chords (seen in image below).
clc
clear all
xCenterk = 5;
yCenterk = 2;
xCenteri = 5;
yCenteri = 5;
xCenterj = 3;
yCenterj = 3;
radiusk = 1.5;
radiusi = 2;
radiusj = 1.5;
theta = 0 : 0.01 : 2*pi;
x=0:.001:100;
y=0:.001:100;
%%%section my question is about
PCi= (x-xCenteri).^2+(y-yCenteri).^2-radiusi.^2;
PCj= (x-xCenterj).^2+(y-yCenterj).^2-radiusj.^2;
PCk= (x-xCenterk).^2+(y-yCenterk).^2-radiusk.^2;
aij=(intersect(PCi,PCj));
aik=(intersect(PCi,PCk));
aijk=intersect(aij,aik);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%plot for visual reference
xk = radiusk * cos(theta) + xCenterk;
yk = radiusk * sin(theta) + yCenterk;
xi = radiusi * cos(theta) + xCenteri;
yi = radiusi * sin(theta) + yCenteri;
xj = radiusj * cos(theta) + xCenterj;
yj = radiusj * sin(theta) + yCenterj;
plot(xk, yk,'b.',xi,yi,'r.',xj,yj,'c.');
hold on
axis equal;
0 Commenti
Risposta accettata
Roger Stafford
il 12 Lug 2014
If you don't need the intersections of the circles, there is an easier way to find the intersection of the chords. Call the centers (x1,y1, (x2,y2), and (x3,y3), and the respective radii r1, r2, and r3. By subtracting the equation for circle 2 from that of circle 1 one can obtain:
2*(x2-x1)*x+2*(y2-y1)*y = r1^2-x1^2-y1^2-r2^2+x2^2+y2^2
This must be satisfied by each of the two intersections (x,y) of circles 1 and 2, and since it is linear in x and y, it must also be satisfied by any point on the line connecting them. Similarly
2*(x3-x1)*x+2*(y3-y1)*y = r1^2-x1^2-y1^2-r3^2+x3^2+y3^2
must hold for any point on the line connecting the intersection points of circles 1 and 3. Consequently, the simultaneous solution to these two equations must be at the point of intersection of the chords. That is what matlab uses the backslash operator for.
Note: It is evident that subtracting the two above equations will produce the equation of the corresponding chord for circles 2 and 3, so a solution to the above equations will also be a solution for this difference, and the three lines must therefore intersect at a common point. We need only find the one intersection point.
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!