Creating a pyramid


import maya.cmds

def Pyramid():

    cmds.polyCube(w=1, h= 1, d= 1)

    cmds.scale(4,4, scaleXZ = True)

    cmds.polyCube(w=1, h= 1, d= 1)

    cmds.move(1 ,moveY = True)

    cmds.scale(3,3, scaleXZ = True)

    cmds.polyCube(w=1, h= 1, d= 1)

    cmds.move(2 ,moveY = True) 

    cmds.scale(2,2, scaleXZ = True)

    cmds.polyCube(w=1, h= 1, d= 1)

    cmds.move(3 ,moveY = True) 

    

                

#######################################################

Pyramid()


this code shows you how to make a pyramid in Maya using python code. in a line format.


the top part is the main code and I have separated the main code using hashtags.

I have also used a function called pyramid which will allow me to call all of the code.

Leave a comment

Log in with itch.io to leave a comment.