Ellipse in parametric form ?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ramesh Bala
el 26 de Jul. de 2018
Comentada: Ramesh Bala
el 7 de Sept. de 2018
I'm trying to create an ellipse in parametric form. I have just two Foci along the major axis. So, how shall I get r1, r2 etc.
point1 = 10 8
point2 = 25 20
The syntax is
t = linspace(0, 2*pi, 200);
xt = r1 * cos(t) + xc;
yt = r2 * sin(t) + yc;
cot = cos(theta); sit = sin(theta);
x = xt * cot - yt * sit;
y = xt * sit - yt * cot;
plot(x, y, '-');
1 comentario
Respuesta aceptada
Matt J
el 26 de Jul. de 2018
Editada: Matt J
el 26 de Jul. de 2018
You cannot determine the ellipse with only the foci. You also need to know r1. Once you know that however, you can determine r2 readily,
xc_yc=(point1+point2)/2;
c=norm(point1-xc_yc);
r2 = r1^2-c^2;
6 comentarios
Matt J
el 6 de Sept. de 2018
I already told you that it was impossible. The foci alone aren't enough.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!