def _(a=[1,2,3,4],b=[2,3,1],
sx='x(t)=%s*sin(%s*t/2)*cos(%s*t/2)<br/>'
sy='y(t)=%s*cos(%s*t/3)*cos(%s*t/3)<br/>'
sz='z(t)=%s*sin(%s*t/2)*sin(%s*t/2)'
s='<p style="font-size:120%;">'
s+=sx%(a,c,c)+sy%(b,a,c)+sz%(c,a,a)+'</p>'
f=lambda p:(a*sin(c*p/2)*cos(c*p/2),
t=Tachyon(xres=400,yres=400,camera_center=(-6,-6,2))
t.texture('t1',color=(0,0,.3),opacity=.5)
t.texture('t2',color=(.7,.7,.7),texfunc=2)
t.parametric_plot(f,0,6*pi,'t1',r=.05,min_depth=d)
t.plane((7,7,-7),(0,-1,1),'t2')
t.light((-7,-7,7),2,(1,1,1)); t.show()
No comments:
Post a Comment