Revision 23 as of 2009-10-25 02:43:08

Clear message

from visual import * from random import uniform

# David Scherer

scene.range = 3

a = convex(color=(0.5,0,0)) b = convex(color=(0,0.5,0)) c = convex(color=(0,0,0.5)) d = convex(color=(0.5,0,0.5)) e = convex(color=(0.5,0.5,0)) f = convex(color=(0,0.5,0.5))

# circle t = arange(0,2*pi,0.1) e.pos = transpose( (sin(t), cos(t)+2, 0*t) )

# triangle t = arange(0,2*pi,2*pi/3) f.pos = transpose( (sin(t)-2, cos(t)+2, 0*t) )

# disk for t in arange(0,2*pi,0.1):

# box for i in range(8):

# random sphere L = [] for i in range(1000):

c.pos = L

# lat/long sphere L = [] for t in arange(0,2*pi,0.2):

print len(L) d.pos = L

# modify the disk p = a p.color = (p.color[0]*2, p.color[1]*2, p.color[2]*2) while 1:

Unable to edit the page? See the FrontPage for instructions.