Tuesday, June 9, 2009

02B - Deborah Kaiser - Lofting curves (exploring the results with different functions)



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=i*i/10
y=x*x*.5
z=y*x*sin(i)*.03
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 (15,10,30, crv)
#Lofting the curves
cmds.loft(myCurve)

No comments:

Post a Comment