Monday, May 25, 2009

03 - Diana Pérez - Curves

I tried this script to create curves out of the points created with the Math Function script I wrote before, but somehow it's not drawing the curves. Could you tell me what's wrong?

Thanks


#function to create curves on the fly
def curves(amplitude):
#define initial variables
numPoints = 600
amplitude = 10

#create an empty list to store the points
points = []

#loop and gather point information
for i in range (0, numPoints, 1):
#funtion for the curve
x = sin(i)*i
y = (cos(i)*sin(i))*i
z = i*amplitude/10
myPoint = (x, y, z)
#store the point in the list
points.append (myPoint)

#create the curves
myCurve = cmds.curve(d=3, p=points) #degree 3
return myCurve

No comments:

Post a Comment