#Considering the Identity Cos^2(t) + Sin^2(t) = 1
#This position vector R traces the curve x**2/a**2 + y**2/b**2 = 1, for sweeping t from 0 to 2*pi.
#When a=b we get a circle. Else we get an ellipse.
#Which is demostrated below.
reset()
var('y')
var('a,b,t')
r=vector([a*cos(t),b*sin(t)])
@interact
def ellipse(a=(1..5),b=(1..5),t=(0..64)):
     t=t/10
     p1=arrow((0,0),(r[0](a,t),r[1](b,t)))
     show(implicit_plot(x**2/a**2 + y**2/b**2 == 1, (x, -5,5),(y, -5,5),aspect_ratio=1)+p1)

Kreyszig-8.4-2 (last edited 2010-12-17 09:22:30 by Joe Ninan)