Tuesday, 11 February 2014

Rendered in Occlusion is finished Esplande Dome


Assignment 2 Script Python

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(-0.6,-0.1,-0.3, mysphere[0])
        mc.rotate(180,0,0, mysphere[0])
        mc.scale(12,8,12.10, mysphere[0])
        sphereList.append(mysphere[0])
    return sphereList
 
def createPyramid ():
    pyramidList = []
    num = 18
    for each in range(num):
        aX = math.cos(each*0.1)*1
        aY = math.sin(each*0.1)*7.8
        aZ = math.cos(each*-0.1)*12.3
        mypyramid = mc.polyPyramid()
        print mypyramid
        facename =  "%s.f[0]"%mypyramid[0],"%s.f[2]"%mypyramid[0],"%s.f[3]"%mypyramid[0]
        print facename
        mc.polyDelFacet(facename)
        mc.move(0.7,aY,aZ, mypyramid[0])
        mc.rotate(390,37,40, mypyramid[0])
        if each >= 1:
            pyramidList.append(mypyramid[0])
    mc.delete('pPyramid1')
    return pyramidList
 
 

def makePattern (exPyramidCreate):
    myGrp = mc.group(exPyramidCreate)
    for each in range(45):
        myDup = mc.duplicate(myGrp)
        mc.rotate(0,each*-8,-0.4, myDup[0], pivot=[-0.7,-0.5,-0.5])
        #mc.rotate(-42,0,0, myDup[0])
        mc.move(0,0,0)
   
def myCreation():
    exPyramidCreate = createPyramid ()
    exSphereCreate = createSphere ()
    exmakePattern = makePattern (exPyramidCreate)
     
myCreation()

That is the Script i created for the Esplanade
I use sin and cos to bend in a semi circle and a half sphere as base

Slowly i understand what are function use for and math logic to identify each pyramid that i have use to form
my patterns
CHALLENGES 
For the challenges i have was the math logic cause of  the pyramid and the faces surrounding the sphere
the math part i really to understand each pyramid perimeters setting spacing of my objects keep it within the position and the size of the sphere

Understanding the function for creating a pattern
I had to set my source object for it to follow along as it duplicating each row accordingly
plus the pyramid has to touch the surface of my sphere

I created my half sphere using the original sphere and cutting it to half to form my dome and place it in the middle of the grid as my base

what i have learnt of for this assignment 
I learn about the function and math logic needed for this project and the scripting like using sin and cos for the assignment and MC.COMMANDS for the objects and the layout of the script for
the programming

Pattern Design for Python Programming
Chosen pattern from the esplanade






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

Saturday, 8 February 2014



SCREEN SHOT OF THE  SCRIPT 
 problem will be the pattern keeps moving in the X axis and i figured out using the Y axis and start from the source pyramid 
and give a variable name for the script to set for pyramid and get advise from lectures for the script  
About making a group and have two different function for the pattern and the dimensions
and the pattern for the sphere be place at the grid and ground plane for the assignment and get online advise on the coding for the pyramid