
def cubeSphere():
myCubeList =[]
for each in range(2000):
myCube = mc.polyCube(name="myCube")
mc.move (10 , 0 , 0 , myCube[0])
rot= random.uniform (0,360)
mc.rotate ((0),(each*rot) ,(0) , myCube[0], pivot =(0,0,0))
myCubeList = cubeSphere()
print myCubeList
For this whole function, it basically creates a round circle around the world 0,0,0 axis
If the values in the X axis in mc.move changes , the radius of the circle changes since the circle grows towards the x axis.
While in mc.rotate, in Y axis creates a circle rotation of the cube to follow since the rot* range is from 0 to 360.
However now it only creates a circle in the X axis thus if i need it to form a sphere shape I would have to alter the stuff on the Z axis. Meanwhile any numbers as long with rot* would create a circle as shown below with only the circle shown will be in different axis
Result:
No comments:
Post a Comment