Hi,
Am trying to execute the following code for the range 10 t0 1000. But dynamo is showing the following error in all ranges though I set the geometry range to extra large! I am unable to find out any solution. Any help?
Warning: Your inputs lie outside of the allowable modeling range, consider choosing the Extra Large setting with a modeling range between 1 and 100,000,000 from the “Settings => Geometry Working Range” dialog
The code:
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
# Place your code below this line
# Lorenz attractor equations
def lorenz(state, t, sigma, rho, beta):
x, y, z = state
return [sigma*(y-x), x*(rho-z)-y, x*y-beta*z]
# Initial state
x0 = 1
y0 = 1
z0 = 1
state0 = [x0, y0, z0]
# Parameters
sigma = 10
rho = 28
beta = 8/3
# Time range
t_eval = [i*0.01 for i in range(0,10)]
# Initialize the list of points
points = []
# Append the initial state to the list of points
points.append(Point.ByCoordinates(x0, y0, z0))
# Solve the ODE
for t in t_eval:
x, y, z = lorenz(state0, t, sigma, rho, beta)
point = Point.ByCoordinates(x, y, z)
points.append(point)
state0 = [x, y, z]
OUT = points
Lorenz function.dyn (3.1 KB)