xxxxxxxxxx
def _(a=[3,2,1],b=[3,2,1],c=[3,2,1]):
s='x(t)=sin(%s*t)^2; y(t)=cos(%s*t)^3; z(t)=sin(%s*t)*ln(t+1)'
pretty_print(html('<p style="font-size:140%;">'+s%(a,b,c)+'</p>'))
f=lambda p:(sin(a*p)^2,cos(b*p)^3,sin(c*p)*ln(p+1))
t=Tachyon(xres=500,yres=500,camera_center=(-4,-6,1))
t.texture('t1',color=(0,0,.3),opacity=.5)
t.texture('t2',color=(.9,.9,.9),texfunc=2)
t.parametric_plot(f,0,6*pi,'t1',r=.03)
t.plane((7,7,-7),(0,-1,1),'t2')
t.light((-8,-6,4),1,(1,1,1)); t.show()
No comments:
Post a Comment