I want to find out intersection points of two circles in symbolic form. The two circles are C1: x^2+y^2=(r+a)^2 and C2: (x-(b-l/2))^2+(y-sqrt3 *L/2)^2=(r+a)^2. Can anyone help me?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anjan Dash
le 8 Sep 2018
Commenté : Anjan Dash
le 10 Sep 2018
I am trying to find out work space of a parallel manipulator of 3-PRR type. The workspace of such a manipulator consists of intersection between circles and lines. In order to generate a generic expression of workspace I need to determine the intersection points between two circles as mentioned above.I can do some symbolic computation using matlab. But this one I am not getting any clue. Can anyone help me?
4 commentaires
KALYAN ACHARJYA
le 8 Sep 2018
If I understand correctly, First plot the two circles and find the intersection, r, a,b and L are variables, Without define these how can you plot the equation?
Réponse acceptée
Dimitris Kalogiros
le 8 Sep 2018
When you will use it inside a loop with real values for a, b, l, L, r, maybe it is better to use vpasolve() instead of solve()
More over without loss of generality, I assume that r+a>0
clear; clc; close all;
syms x y
syms a b r l L
%circles equations
Circle_1= x^2+y^2==(r+a)^2
Circle_2= (x-(b-l/2))^2+(y-sqrt(3)*L/2)^2==(r+a)^2
%centers of these circles
center_1=[sym(0) sym(0)]
center_2=[b-l/2 sqrt(3)*L/2]
%distance of among centers
center_dist=norm(center_2-center_1)
%---choose among 3 cases---
%assume(center_dist>2*(r+a));
%assume(center_dist==2*(r+a));
assume(center_dist<2*(r+a));
if isAlways(center_dist>2*(r+a))
disp('no intersection points');
elseif isAlways(center_dist==2*(r+a))
disp('one intersection points');
Apoint=(center_2-center_1)/2
else
disp('two intersection points');
mySol=solve(Circle_1, Circle_2, center_dist<2*(r+a), [x y])
Apoint=[mySol.x(1) mySol.y(1)]
Bpoint=[mySol.x(2) mySol.y(2)]
end
I hope that I showed the path...
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Conversion Between Symbolic and Numeric dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!