Hi Adam,
> And second method :
>
> /* draws cardioid in polar form */
> e1:exp(t*%i)/2-exp(2*t*%i)/4;
> r:abs(e1);
> load(draw);
> draw2d(nticks = 2000, xrange = [-2.5,0.5], yrange=[-1.5,1.5], color =
> blue, line_width
> = 3, polar(r,t,0,2*%pi),grid=true)$
>
Note that you are drawing two different curves. t is not the argument of
the complex points:
(%i1) e1:exp(t*%i)/2-exp(2*t*%i)/4$
(%i2) re:realpart(e1)$
(%i3) im:imagpart(e1)$
(%i4) display2d:false$
(%i5) re, t=%pi/2;
(%o5) 1/4
(%i6) im, t=%pi/2;
(%o6) 1/2
Clearly, t=%pi/2 is not the argument of 1/4 + 1/2 * %i. It works fine as
a parameter in a parametric representation, but not as an angle in a
polar representation.
If you want to draw a cardioid in polar form, use equation
r=k*(1-cos(theta)):
(%i7) load(draw)$
(%i8) draw2d(polar(5*(1-cos(theta)), theta,0,2*%pi))$
hth
--
Mario Rodriguez Riotorto
http://www.telefonica.net/web2/biomates