Pictures of dynamics
The pictures phase of the chaos package: cobwebs, orbits and return maps, bifurcation diagrams, escape-time pictures with honest pixels, attractors, L-systems and cellular automata, and frames that move a parameter.
Cobwebs
To iterate by eye: go up to the graph of , across to the diagonal , and repeat. cobwebFigure(f, x0, n) draws that staircase with the graph and the diagonal. A fixed point is where the graph meets the diagonal; the staircase spirals in when there and out when . It takes a float function or chaos's IteratedMap.
Orbits, return maps, bifurcations
orbitFigure draws against ; returnMapFigure(values, { lag }) the pairs , where a series that looks random can show it is a curve. bifurcationFigure(diagram) draws the long-run values from chaos's bifurcationDiagram, with marks at bifurcation points that chaos proves.
Escape-time pictures
Chaos classifies each pixel of the Mandelbrot set, a Julia set or Newton's basins as proved inside, proved outside, or undecided. escapeFigure(grid) keeps the three apart: inside dark, outside shaded by escape time, undecided in its own colour (orange by default), so the picture never claims more than was proved. Its status is certified.
Attractors, L-systems, automata
pointCloudFigure and attractor3d plot points in the plane or in space. segmentsFigure(lsystem.turtle(n)) draws a turtle path, marked exact when the angle is a multiple of 30° and chaos gives exact end points. spacetimeFigure(rows) draws an elementary automaton's run with time going down, and lifeFigure a Life pattern.
Moving a parameter
parameterFrames(values, build) builds one figure per value; framesSVG plays them. A cobweb as runs through the period doublings of the logistic map is the classic example.
@ratmath/graphics and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math, and SHOW(svg) draws a picture.