Showing posts with label 02A. Show all posts
Showing posts with label 02A. Show all posts

Saturday, July 11, 2009

02A - Anthony Adelmann


import maya.cmds as cmds
from math import*
from random import*

numRow = 20
numColumns = 13
numHeights = 12
points = []

for i in range(0, numRow, 1):
x = (i)
for j in range (0, numColumns, 1):
y = j
for k in range (-1, numHeights, 1):
z = sin (k*i*j)
myPoint = (x,y,z)
points.append(myPoint)
cmds.curve(d=3, p=points)

Friday, July 10, 2009

02A - Valentina de Leon


import maya.cmds as cmds

#CURVES THROUGH POINTS

from math import*

numRows = 15
numColumns = 30
num3rdDimension = 50
points=[]
for i in range(0,numRows,1):
x = (i)
for j in range(-15,numColumns,30):
y = j
for k in range(5,num3rdDimension,30):
z = sin(k*i*j)*5

# ONDULATING GRID
myPoint=(x,y,z)
points.append(myPoint)
cmds.curve(d=30, p=points)

Monday, June 8, 2009

Lofting curves - Deborah Kaiser



import maya.cmds as cmds
from math import*
from random import*

# Surfaces from curves
#Curves
def curves (amplitude):
numPoints= 50
#list to store the points
points=[]
#loop
for i in range (1,numPoints,1):
#function of the spiral curve:
x=sin(i)*100
y=cos(i)*amplitude*i/10*tan(i)
z= i*2*sin(i)
myPoint= (x,y,z)
#store the points in the list
points.append(myPoint)
myCurve=cmds.curve(d=3, p=points)
return myCurve
#List to store the curves
myCurve=[]
#Number of curves
numCurves=20
#Call the curve in a loop
for i in range(0,numCurves,2):
crv= curves (i)
#Store the curve in the list
myCurve.append (crv)
print crv
#move the curves
cmds.move (10,50,1, crv)
#Lofting the curves
cmds.loft(myCurve)

Thursday, May 28, 2009

Monday, May 25, 2009

O2A_DengLei




I creat some curves but they all in the same position , i mean they are all overlap, i divide by hand


02A - Diana Pérez - 3D Grid

This is the assignment about making a 3D grid of points, which I couldn't make work the last time.

# GRID 3D
numColumns = 30
numRows = 30
numLevels = 30

for i in range (0, numColumns, 1):
x = i
for j in range (0, numRows, 1):
y = j
for k in range (0, numLevels, 1):
z = k
myPoint = [x, y, z]
cmds.spaceLocator (p = myPoint)


02A_COSMOS_CURVES


import maya.cmds as cmds

#craeting curves through points

from math import*

numRows = 20
numColumns = 20
num3rdDimension = 1
Points=[]
for i in range(0,numRows,1):
x = (i)
for j in range(0,numColumns,1):
y = j
for k in range(-1,num3rdDimension,1):
z = sin(k*i*j)# this will craete an undulating grid
myPoint=(x,y,z)
points.append(myPoint)
cmds.curve(d=3, p=points)


Sunday, May 24, 2009

02A - Deborah Kaiser - from point to curves

Daniel, i took the function from the previous exercise but i can not get it to turn the points into a curve. What am i doing wrong?

Thnx!


def curves (amplitude):
numPoints = 200
amplitude = 1
points = []


for i in range (0,numPoints,1) : # (start, end, increment)ve
x = i + 3*i
y = cos (i)*amplitude*10
z = i*x*.001 + y*0.0001 +1
myPoint = [x,y,z]
points.append (myPoint)


myCurve = cmds.curve (d =3, p= points)
return myCurve

02A_Clau_from points to curves

In the first part of this exercise I took the code of the previous assingment, but instead of plotting points I generated curves (see image). Then I tried to convert the code into a function and return the value but didn't get a result. I have a Syntax Error. I don't know where is the mistake.


import maya.cmds as cmds
from math import*
from random import*
######################################################
#from points to curves
#defining initial variables
numRows= 40
numColumns=4
numLevels=12
amplitude = 12

#create an empty list to store the points
points= []

#defining the loop and gather information
for i in range (-1,numRows,1):
x= sin(6*i)*amplitude
for j in range (-1,numColumns,2):
y= cos(i)*8
for k in range (0,numLevels,1.5):
z= k+1
myPoint=(x,y,z)
#store the point in the list
points.append(myPoint)

#create the curve
cmds.curve (d= 3, p= points) #curve degree 3

######################################################
######################################################
#2ND PART
#####################################################
#defining initial variables
numRows= 40
numColumns=4
numLevels=12
amplitude = 12

#defining the curve
def Curves (numPoints, amplitude)

#create an empty list to store the points
points= []

#loop and gather point information
for i in range (-1,numRows,1):
x= sin(6*i)*amplitude
for j in range (-1,numColumns,2):
y= cos(i)*8
for k in range (0,numLevels,1.5):
z= k+1
myPoint=(x,y,z)
#store the point in the list
points.append(myPoint)

#creating the curve
myCurve= cmds.curve (d=3, p=points) #curve degree 3

#returning the name of the curve created
return myCurve