Tangent between two parametric curves

3 views (last 30 days)
Emidio Bacco
Emidio Bacco on 17 Nov 2017
Edited: Emidio Bacco on 18 Nov 2017
Hello everyone, I want find the equation of the tangent line between two parametric curves an ellipse and a circumference. The parametric equations of these two curves are :
x1_circle = xo_centre + radius*cos(t1)
y1_circle = y1_centre + radius*sen(t1)
x1_ellipse = x1_centre + a*cos(t2)
y1_ellipse = y1_centre + b*sen(t2) where a=horizontal radius and b=vertical radius
Any ideas ? Thanks
  2 Comments
John D'Errico
John D'Errico on 17 Nov 2017
Edited: John D'Errico on 17 Nov 2017
I assume you mean sin, and not sen? There is no sen function in MATLAB.
Regardless, this is not difficult. Compute the equation of a tangent line to the ellipse at any value of the parameter t2.
Now, solve for a value of t2, such that the line intersects the circle at exactly one point. There will be two solutinos in general, as long as problem is not degenerate, like the ellipse is wholly contained inside the circle.
So what have you tried? If nothing, why not? This is not a MATLAB question, so far, but a request for someone to do the work for you.
Emidio Bacco
Emidio Bacco on 18 Nov 2017
Edited: Emidio Bacco on 18 Nov 2017
Yes sorry I mean sin. My goal is to find a way for calculate automatically the two higher points of tanget given a certain configuration. In other words if I rotate the ellipse I have to be able to find the two new higher points of tangent (see the figures). I find the expression of the angular coefficent of the tangent line in function of t1 and t2 for ellipse and circle respectively. To solve my problem I have to solve a system of equation :
- angular coefficent must be the same
- the line have to be tangent for both curves
This is the code
syms t1 t2
a=5; b=10; x0=5; y0=10;
x_ellipse = x0+a*cos(t1);
y_ellipse = y0+b*sin(t1);
ezplot(x_ellipse,y_ellipse),hold on
deriv_x=diff(x_ellipse)
deriv_y=diff(y_ellipse)
m_coeff_ellipse=deriv_y/deriv_x
x0_circle=30; y0_circle=10; raggio=3;
x_circle=x0_circle+raggio*cos(t2);
y_circle=y0_circle+raggio*sin(t2);
ezplot(x_circle,y_circle);
axis([-10 40 -20 30])
m_coeff_circle=diff(y_circle)/diff(x_circle)
m_tangent=solve(m_coeff_ellipse==m_coeff_circle)
In other words I have to be able to find the value of t1 and t2, that tell me the two point of tanget for the ellipse and for the circle.
How can I write the system of equation ? Is it correct my idea?
Thanks

Sign in to comment.

Answers (0)

Categories

Find more on Matrix Computations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!