Monday, May 18, 2009

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)

1 comment:

  1. Nice! But it doesn't really make much difference to use negative values on the loop starting command, unless you intend to use the i values inside the loop, which you don't do here. This way,

    for i in range (-5,numPoints,1):

    is just creating 5 points more than numPoints. I am not sure why would you want to do that. It would be the same as writing:

    for i in range (0,numPoints+5,1):

    and it wouldn't change in any way how the loop works or the results produced. On the other hand, if you do want to use the i values inside the loop to generate some values, starting with -5 would make a difference!

    ReplyDelete