Wednesday, 20 May 2015

Week 7 - Assignment 1 WIP

Ideas:

I decided to give a try and do a DNA pattern for Assignment 1.
References:


The shape consist of spheres and cubes. I have thought and tried different methods on creating the single chain. Eventually, I group them together using my script:  (below)

import maya.cmds as mc
import math

myCubeList =[(mc.polyCube(w=4,h=0.6,d=0.6,name="myCube1")) , (mc.polyCube(w=4,h=0.6,d=0.6,name="myCube2")) , (mc.polySphere(name="mySphere1")), (mc.polySphere(name="mySphere2"))]

mc.move (2,0,0,myCubeList[0][0])
mc.move (-2,0,0,myCubeList[1][0])
mc.move (-4.5,0,0,myCubeList[2][0])
mc.move (4.5,0,0,myCubeList[3][0])

mc.rotate (-22.5,0,0,myCubeList[0][0])
mc.rotate (22.5,0,0,myCubeList[1][0])

cmds.group( 'myCube1', 'myCube2', 'mySphere1', 'mySphere2', n='Chain1' )

Chain1 = [myCubeList]

Problems faced:

I am not sure what is the proper pipeline on creating and duplicating plus rotating them uniformly. Hence, the script created may not be in the correct order.

Plans:

After I have found a way of duplicating and rotating them together, I am planning to mirror every alternate chain to create a more organic look of the DNA.
example:
0>>>>0 to right
0<<<<0 to left
0>>>>0
0<<<<0