Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168692
Image: ubuntu2004

Logistic function and limit cycle gives a nice fractal ...

var('x malthus') step(x,malthus) = malthus * x * (1-x) stepfast = fast_callable(step, vars=[x, malthus], domain=RDF) def logistic(m, step): # filter cycles v = .5 for i in range(100): v = stepfast(v,m) points = [] for i in range(100): v = stepfast(v,m) points.append((m+step*random(),v)) return points
points=[] step = 0.005 for m in sxrange(2.5,4,step): points += logistic(m, step) point(points,pointsize=1).show(dpi=150)