
Showing posts with label 01B. Show all posts
Showing posts with label 01B. Show all posts
Tuesday, June 9, 2009
Monday, June 8, 2009
Assingnment 01B - Points to curves

import maya.cmds as cmds
from math import*
from random import*
######################################################
#from points to curves
#defining initial variables
numRows= 30
numColumns=3
numLevels=9
amplitude = 7
#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,2):
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
from math import*
from random import*
######################################################
#from points to curves
#defining initial variables
numRows= 30
numColumns=3
numLevels=9
amplitude = 7
#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,2):
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
Sunday, May 24, 2009
01B_COSMOS_POINTS
import maya.cmds as cmds
#creating a 3d points grid using mathematical function
from math import*
numRows = 20
numColumns = 20
num3rdDimension = 1
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)
cmds.spaceLocator(p=myPoint)
01B - Deborah Kaiser - function, succesful attempt
from math import *
numPoints = 200
amplitude = 1
for i in range (0,numPoints,1) : # (start, end, increment)
x = i + 3*i
y = cos (i)*amplitude*10
z = i*x*.001 + y*0.0001 +1
myPoint = [x,y,z]
cmds.spaceLocator (p=myPoint)
numPoints = 200
amplitude = 1
for i in range (0,numPoints,1) : # (start, end, increment)
x = i + 3*i
y = cos (i)*amplitude*10
z = i*x*.001 + y*0.0001 +1
myPoint = [x,y,z]
cmds.spaceLocator (p=myPoint)
01B - Deborah Kaiser - 3d grid, succesful attempt
Saturday, May 23, 2009
Monday, May 18, 2009
Zhulei_ points in grids
clau_tower of points
clau_grids of points

#grid of points using nested loops
#rotating grids of points in "z" axis
numRows=12
numColumns=10
for i in range (0,numRows,2):
x=i
print "row", i
for j in range (0,numColumns,1):
y=j+1
print "column", j
z=1
myPoint = (x,y,z)
cmds.spaceLocator (p=myPoint
numRows=12
numColumns=10
for i in range (0,numRows,2):
x=i/2
print "row", i
for j in range (0,numColumns,1):
y=j+1
print "column", j
z=-1
myPoint = (x,y,z)
cmds.spaceLocator (p=myPoint)
numRows=12
numColumns=10
for i in range (0,numRows,2):
x=-i/2
print "row", i
for j in range (0,numColumns,1):
y=-j
print "column", j
z=2
myPoint = (x,y,z)
cmds.spaceLocator (p=myPoint)
numRows=12
numColumns=10
for i in range (0,numRows,2):
x=-i
print "row", i
for j in range (0,numColumns,1):
y=j
print "column", j
z=3
myPoint = (x,y,z)
cmds.spaceLocator (p=myPoint)
numRows=12
numColumns=10
for i in range (4,numRows,2):
x=i
print "row", i
for j in range (0,numColumns,1):
y=j+2
print "column", j
z=5
myPoint = (x,y,z)
cmds.spaceLocator (p=myPoint)
clau_plot points

#random points loop using negative numbers
numPoints = 60
for i in range (-5,numPoints,1):
x= randint(0,5) #this generate a random integer between 0 and 5
y= randint (0,5)
z= 0
myPoint= (x,y,z)
cmds.spaceLocator (p=myPoint)
numPoints = 100
for i in range (-5,numPoints,1):
x= randint(0,5) #this generate a random integer between 0 and 5
y= randint (0,5)
z= 5
myPoint= (x,y,z)
cmds.spaceLocator (p=myPoint)
numPoints = 60
for i in range (-5,numPoints,1):
x= randint(-5,0) #this generate a random integer between 0 and 5
y= randint (-5,0)
z= 10
myPoint= (x,y,z)
cmds.spaceLocator (p=myPoint)
numPoints = 100
for i in range (-5,numPoints,1):
x= randint(-3,0) #this generate a random integer between -3 and 0
y= randint (0,5)
z= 10
myPoint= (x,y,z)
cmds.spaceLocator (p=myPoint)
numPoints = 180
for i in range (-5,numPoints,1):
x= randint(-3,0) #this generate a random integer between -3 and 0
y= randint (-5,5)
z= -5
myPoint= (x,y,z)
cmds.spaceLocator (p=myPoint)
numPoints = 240
for i in range (-5,numPoints,1):
x= randint(-5,10) #this generate a random integer between -5 and 10
y= randint (-5,0)
z= -3
myPoint= (x,y,z)
cmds.spaceLocator (p=myPoint)
Sunday, May 17, 2009
Subscribe to:
Posts (Atom)