Loading...
Loading...
Generate bifurcation diagrams for dynamical systems. Use when visualizing parameter-dependent behavior transitions.
npx skill4agent add plurigrid/asi bifurcation-generator# Logistic map bifurcation
import numpy as np
import matplotlib.pyplot as plt
def logistic_bifurcation(r_min=2.5, r_max=4.0, steps=1000):
r_vals = np.linspace(r_min, r_max, steps)
x = 0.5
for r in r_vals:
for _ in range(100): # transient
x = r * x * (1 - x)
for _ in range(50): # attractor
x = r * x * (1 - x)
yield r, xbifurcation