|
![](/i/fill.gif) |
Ulrik <ulr### [at] hem passagen se> wrote:
: I'm just wondering if it's possible to use POV to help me draw 2D sin curves
Of course.
#macro Function(X)
sin(X)
#end
#declare Step=.1;
#declare CurveThickness=.03;
#declare GridSize=10;
#declare GridThickness=.025;
//----------------------------------------------------------------------------
#default { finish { ambient 1 } }
camera { location -z*10 look_at 0 angle 45 orthographic }
#declare Ind=-GridSize/2;
#while(Ind<=GridSize/2)
#declare Col=(Ind=0?y:z);
cylinder
{ <Ind,-GridSize/2,GridThickness><Ind,GridSize/2,GridThickness>,GridThickness
pigment { rgb Col }
}
cylinder
{ <-GridSize/2,Ind,GridThickness><GridSize/2,Ind,GridThickness>,GridThickness
pigment { rgb Col }
}
#declare Ind=Ind+1;
#end
union
{ #declare X=-GridSize/2;
#declare oPos=<X,Function(X),0>;
#declare X=X+Step;
#while(X<=GridSize/2)
#declare Pos=<X,Function(X),0>;
cylinder { oPos, Pos, CurveThickness }
sphere { Pos, CurveThickness }
#declare oPos=Pos;
#declare X=X+Step;
#end
pigment { rgb 1 }
}
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |