Thursday, December 13, 2007

spheres

Light reflecting in four tangent spheres....this relates to a math problem I abandoned a few years ago, maybe I'll work on it again someday. The sage code for the above:

t = Tachyon(camera_center=(0,-4,1), xres = 1200, yres = 800, raydepth = 12, aspectratio=.75, antialiasing = True)

t.light((0.02,0.012,0.001), 0.01, (1,0,0))
t.light((0,0,10), 0.01, (0,0,1))
t.texture('s', color = (.8,1,1), opacity = .9, specular = .95, diffuse = .3, ambient = 0.05)
t.texture('p', color = (0,0,1), opacity = 1, specular = .2)
t.sphere((-1,-.57735,-0.7071),1,'s')
t.sphere((1,-.57735,-0.7071),1,'s')
t.sphere((0,1.15465,-0.7071),1,'s')
t.sphere((0,0,0.9259),1,'s')
t.plane((0,0,-1.9259),(0,0,1),'p')
t.show()

No comments: