Thursday, July 23, 2009

02-B Zhulei









import maya.cmds as cmds
from random import*
from math import*


#REVOLVING A CURVE TO FORM A SURFACE
def revolve(numPoints,myAxis,myEndSweep):
"revolve a curve"
myPoints=[]
for i in range(numPoints):
x=uniform(0,15)
y=i*3
z=cos(sin(5*i))*i
myPoints.append([x,y,z])
crv=cmds.curve(ep=myPoints,d=3)
cmds.revolve(crv,axis=myAxis,endSweep=myEndSweep)
revolve(20,[1,0,1],360)

No comments:

Post a Comment