Monday, May 18, 2009

Deborah & Diana Intent 2 - Doubt

#We couldn't make this work either

from math import *

numPoints = 200
amplitude = 10
for i in range (0,numPoints,1) : # (start, end, increment)
x = (i*i + 3i + 5)
y = cos (i)*amplitude
z = i*x + y*y +1
myPoint = [x,y,z]
print myPoint
cmds.spaceLocator (p=myPoint)

1 comment:

  1. I think we talked about it last class, no? in Any case, here are some comments:
    1) As there is no indentation in your code here, first check if all is properly indented.
    2) Are you getting any error messages?
    3) when you define the x value, the term 3i doesn't mean much to Python, you should always use the * operator when doing multiplications

    It looks all properly written (except for the 3i), so it is strange it is not working. Check the printed myPoint values, maybe these are strange numbers (either too big or to close), which makes it hard to see the result.

    ReplyDelete