| Author |
Comment/Response |
Giulia
|
07/03/08 4:13pm
I tried to convert some code from the 'Mathematica in action ' book by Stan Wagon.
The following code need conversion:
cycloid[t_]:={t-Sin[t],1-Cos[t]}
frames=30;
locus=Table[cycloid[t],{t,0,2 \[Pi],2 \[Pi]/(frames-1)}];
Do[t = i 2 \[Pi]/(frames-1);
Show[Graphics[{
{GrayLevel[0.5],Disk[{t,1},1]},
Circle[{t,1},1],Line[{{-1,0},{7,0}}],
{AbsoluteThickness[2], Line[{{t,1},locus [[i+1]]}]},
{AbsolutePointSize[3], Map[Point,Take[locus,i+1]]} }],
AspectRatio->Automatic,
PlotRange -> {{-1.5, 7.5},{-0.2, 2.2}},
Frame -> True,FrameTicks -> None],
{i,0,frames-1}]
I know do must be changed with Animate.
But with this change, i receive the message 'take is not a graphics primitive or directive'.
Why? Please help.
thank you
Giulia
URL: , |
|