import maya.cmds as cmds
from math import*
from random import*
# Surfaces from curves
#Curves
def curves (amplitude):
numPoints= 50
#list to store the points
points=[]
#loop
for i in range (1,numPoints,1):
#function of the spiral curve:
x=tan(i)*amplitude
y=sin(i)*cos(i)*20
z=tan(i)*10
myPoint= (x,y,z)
#store the points in the list
points.append(myPoint)
myCurve=cmds.curve(d=3, p=points)
return myCurve
#List to store the curves
myCurve=[]
#Number of curves
numCurves=20
#Call the curve 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 (10,20,10, crv)
#Lofting the curves
cmds.loft(myCurve)
No comments:
Post a Comment