Monday, 10 February 2014
The research and references i look up on how to cut poly Facet
my previous script coding
import maya.cmds as mc
import math
def createSphere ():
sphereList = []
nums = 1
for each in range(nums):
aX = 0
aY = 0
aZ = 0
mysphere = mc.sphere(ssw=0, esw=180)
mc.move(aX,aY,aZ, mysphere[0])
mc.rotate(180,0,0, mysphere[0])
mc.scale(11.8,8,12, mysphere[0])
sphereList.append(mysphere[0])
return sphereList
def createPyramid ():
pyramidList = []
num = 20
for each in range(num):
aX = math.cos(each*0.05)*0.7
aY = math.sin(each*0.1)*7.8
aZ = math.cos(each*0.1)*12.3
mypyramid = mc.polyPyramid()
facename = "%s.f[0]"%mypyramid[0],"%s.f[2]"%mypyramid[0],"%s.f[3]"%mypyramid[0]
print facename
mc.polyDelFacet(facename)
mc.move(aX,aY,aZ, mypyramid[0])
mc.rotate(380,50,1, mypyramid[0])
pyramidList.append(mypyramid[0])
return pyramidList
def makePattern (exPyramidCreate):
myGrp = mc.group(exPyramidCreate)
for each in range(45):
myDup = mc.duplicate(myGrp)
mc.rotate(0,each*-8,1, myDup[0], pivot=[0,0,0])
#mc.rotate(-42,0,0, myDup[0])
mc.move(0,0,0)
def myCreation():
exPyramidCreate = createPyramid ()
exSphereCreate = createSphere ()
exmakePattern = makePattern (exPyramidCreate)
myCreation()
for the start that i created during the project
Subscribe to:
Post Comments (Atom)


No comments:
Post a Comment