|
This plot shows the function (cos(s), sin(s), 0.5) (exp(cos(s)) - 2cos(4s) + sin(s / 12)^5) with s ranging from -1.57 to 4.71. A two-dimensional version of this butterfly curve is given in Stan Wagon's book "Mathematica in Action". |
|
Same data, different visualization. |
Here is how to create these graphics within Mathematica:
tab1=Table[
{Cos[s],Sin[s],0.5}*(Exp[Cos[s]]-2Cos[4 s]+Sin[s/12]^5),
{s,-Pi/2.,2.Pi-Pi/2.+0.01,2Pi/100.}];
g=Show[Graphics3D[Line[tab1]],Axes->True,
ViewPoint->{0,0,2},ViewVertical->{1,0,0},
AxesLable->{x,y,z}]
This will produce the simple version. The colored version is produced by:
tab2=Table[{Hue[N[i/Length[tab1]]],
Polygon[{{0,0,0},tab1[[i]],tab1[[i+1]]}]},
{i,1,Length[tab1]-1}];
g=Show[Graphics3D[{EdgeForm[],tab2},Lighting->False,
Boxed->False,ViewPoint->{-0.416,1.290, 0.974},
ViewVertical->{0.632, -0.389, 1.518}]];
The procedure to use the Graphics3D object with LiveGraphics3D is explained in the documentation.