cardioid



Hi

Thx for answer.


> 
> 
>> 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:

So the problem is he name of argument ?
I have changed "t" to "theta" :

(%i1) e1:exp(theta*%i)/2-exp(2*theta*%i)/4;
(%o1) %e^(%i*theta)/2-%e^(2*%i*theta)/4
(%i2) r:abs(e1);
(%o2)sqrt((sin(theta)/2-sin(2*theta)/4)^2+(cos(theta)/2-cos(2*theta)/4)^2)
(%i3) load(draw);
(%i4) draw2d(nticks = 2000, xrange = [-2.5,0.5], yrange=[-1.5,1.5], 
color = blue, line_width= 3, polar(r,theta,0,2*%pi),grid=true)$

but it gives the same curve.


> 
> 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))$

It works good but this is diffrent cardioid.


Adam