Total newbie question here. I have been looking around here and other internet searches and cannot find a great solution. I am scripting some geometry variables in the software Ansys. It is called spaceclaim and they use IronPython for the scripting language. I cannot at this time import numpy to take advantage of any libraries. I am trying to pattern a set of points, where the points are a function of a geometric parameter. I tried to boil it down for clarity: (the numbering and equations are meaningless, just wanted to lay out an example that illustrates my problem)
i=0
S_1 = 3
S_= []
xpi_ = []
ff_= 2
np=4
for i in range(np):
S_[i + 2] = S_[i + 1] + 10 * ff_
xpi_[i + 2] = (S_[i + 1])**2
So in this example:
first loop
S_2 = S_1 + 10 * ff = 23
xpi_2 = S_1**2 = 9
second loop
S_3 = S_2 + 10 * ff = 43
xpi_3 = S_2**2 = 529 ...
When I execute it jupyter I get this:
----> 8. S_[i + 2] = S_[i + 1] + 10 * ff_
IndexError: list index out of range
Much appreciated for any help!
John