#Exercise 02B
import maya.cmds as cmds
from math import*
from random import*
#from curves to surfaces
#1 Step: create a curve
def curves (amplitude):
#def initial variables
numPoints= 50
#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/1.2
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=20
#function to 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 (25,15,15, crv)
#loft the curves
cmds.loft(myCurve)
Monday, June 8, 2009
Clau_Ex 02B
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment