
import maya.cmds as cmds
from math import*
from random import*
#from curves to surfaces
#step 1, create a curve
def curves (amplitude):
#def initial variables
numPoints= 70
#create an empty list to store the points
points=[]
#loop and gather information
for i in range (1,numPoints,1):
#function of the spiral curve:
x=sin(i)*amplitude
y=cos(i)*amplitude
z=i
myPoint=(x,y,z)
#store the points in the list
points.append(myPoint)
myCurve=cmds.curve(d=3, p=points)
return myCurve
#create an empty list to store the curves
myCurve=[]
#define the number of curves
numCurves=19
#function to call the curves in a loop
for i in range(0,numCurves,2):
crv=curves(i)
#store the curve in the list
myCurve.append (crv)
print crv
#move the curves
cmds.move(3,11,4, crv)
#loft the curves
cmds.loft(myCurve)
No comments:
Post a Comment