William,
I remember when first tinkering with Sage some months ago, I stumbled
across some example code you did. It was an elliptic curve (37a)
rendered in Tachyon. That image stuck in my mind. It was really a
nice picture. It really was what motivated me to dig further and
start running a sage server.
Well, I started playing with that image today ... just for some
fun ... check out the result.
(sorry for the length)
t = Tachyon(xres=1000, yres=800, camera_center=(2,7,4),
look_at=(2,0,0), raydepth=4)
t.light((8,3,8), 1, (1,1,1))
t.texture('black', ambient=0.6, diffuse=0.3, specular=0.1,
opacity=1.0, color=(0,0,0))
t.texture('red', color=(1,0,0))
t.texture('grey', color=(.9,.9,.9))
t.plane((0,0,0),(0,0,1),'grey')
t.cylinder((0,0,0),(1,0,0),.01,'black')
t.cylinder((0,0,0),(0,1,0),.01,'black')
E = EllipticCurve('37a')
P = E([0,0])
Q = P
n = 100
for i in range(n):
Q = Q + P
c = i/n + .1
t.texture('r%s'%i,color=(float(i/n),0,0))
t.sphere((Q[0], -Q[1], .04), .04, 'r%s'%i)
tx = 2 # translate the letters in the x direction
ty = 1 # translate the letters in the y direction
sc = 0.01 # scale factor, adjust this to make the letters larger or
smaller
rad = 5*sc # radius of cylinders that make the letters of the word
sage
hgt = 2*rad # height of letters off the plane, 1 means bottom of
cylinder touching plane
t.sphere((sc*85+tx,sc*9+ty,hgt),rad,'black') # this group makes the
letter S in sage
t.sphere((sc*32+tx,sc*9+ty,hgt),rad,'black')
t.sphere((sc*32+tx,sc*49+ty,hgt),rad,'black')
t.sphere((sc*85+tx,sc*49+ty,hgt),rad,'black')
t.sphere((sc*8+tx,sc*83+ty,hgt),rad,'black')
t.sphere((sc*85+tx,sc*83+ty,hgt),rad,'black')
t.fcylinder((sc*85+tx,sc*9+ty,hgt),(sc*32+tx,sc*9+ty,hgt),rad,'black')
t.fcylinder((sc*32+tx,sc*9+ty,hgt),
(sc*32+tx,sc*49+ty,hgt),rad,'black')
t.fcylinder((sc*32+tx,sc*49+ty,hgt),
(sc*85+tx,sc*49+ty,hgt),rad,'black')
t.fcylinder((sc*85+tx,sc*49+ty,hgt),
(sc*85+tx,sc*83+ty,hgt),rad,'black')
t.fcylinder((sc*85+tx,sc*83+ty,hgt),
(sc*8+tx,sc*83+ty,hgt),rad,'black')
t.sphere((sc*236+tx,sc*83+ty,hgt),rad,'black') # this group makes the
AG combination
t.sphere((sc*198+tx,sc*83+ty,hgt),rad,'black')
t.sphere((sc*153+tx,sc*9+ty,hgt),rad,'black')
t.sphere((sc*107+tx,sc*9+ty,hgt),rad,'black')
t.sphere((sc*107+tx,sc*83+ty,hgt),rad,'black')
t.sphere((sc*160+tx,sc*83+ty,hgt),rad,'black')
t.sphere((sc*203+tx,sc*9+ty,hgt),rad,'black')
t.sphere((sc*252+tx,sc*9+ty,hgt),rad,'black')
t.sphere((sc*252+tx,sc*118+ty,hgt),rad,'black')
t.sphere((sc*182+tx,sc*118+ty,hgt),rad,'black')
t.fcylinder((sc*236+tx,sc*83+ty,hgt),
(sc*198+tx,sc*83+ty,hgt),rad,'black')
t.fcylinder((sc*198+tx,sc*83+ty,hgt),
(sc*153+tx,sc*9+ty,hgt),rad,'black')
t.fcylinder((sc*153+tx,sc*9+ty,hgt),
(sc*107+tx,sc*9+ty,hgt),rad,'black')
t.fcylinder((sc*107+tx,sc*9+ty,hgt),
(sc*107+tx,sc*83+ty,hgt),rad,'black')
t.fcylinder((sc*107+tx,sc*83+ty,hgt),
(sc*160+tx,sc*83+ty,hgt),rad,'black')
t.fcylinder((sc*160+tx,sc*83+ty,hgt),
(sc*203+tx,sc*9+ty,hgt),rad,'black')
t.fcylinder((sc*203+tx,sc*9+ty,hgt),
(sc*252+tx,sc*9+ty,hgt),rad,'black')
t.fcylinder((sc*252+tx,sc*9+ty,hgt),
(sc*252+tx,sc*118+ty,hgt),rad,'black')
t.fcylinder((sc*252+tx,sc*118+ty,hgt),
(sc*182+tx,sc*118+ty,hgt),rad,'black')
t.sphere((sc*365+tx,sc*83+ty,hgt),rad,'black') # this group makes
the E in sage
t.sphere((sc*273+tx,sc*83+ty,hgt),rad,'black')
t.sphere((sc*273+tx,sc*9+ty,hgt),rad,'black')
t.sphere((sc*343+tx,sc*9+ty,hgt),rad,'black')
t.sphere((sc*343+tx,sc*49+ty,hgt),rad,'black')
t.sphere((sc*290+tx,sc*49+ty,hgt),rad,'black')
t.fcylinder((sc*365+tx,sc*83+ty,hgt),
(sc*273+tx,sc*83+ty,hgt),rad,'black')
t.fcylinder((sc*273+tx,sc*83+ty,hgt),
(sc*273+tx,sc*9+ty,hgt),rad,'black')
t.fcylinder((sc*273+tx,sc*9+ty,hgt),
(sc*343+tx,sc*9+ty,hgt),rad,'black')
t.fcylinder((sc*343+tx,sc*9+ty,hgt),
(sc*343+tx,sc*49+ty,hgt),rad,'black')
t.fcylinder((sc*343+tx,sc*49+ty,hgt),
(sc*290+tx,sc*49+ty,hgt),rad,'black')
t.show() # long time, e.g., 10-20 seconds
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-forum
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---