Poincaré Plots
Generate and plot Poincaré sections by intersecting 3D trajectories with 2D cutting planes.
Poincaré sections simplify the analysis of high-dimensional continuous systems by intersecting the 3D continuous trajectory with a 2D transversal cutting plane. This converts continuous flow into a discrete map, clarifying the fractal geometry of chaotic attractors.
Cutting Planes
A Poincaré section requires defining a plane equation:
Common planes include simple coordinate cuts (e.g., , , or ) with a specified crossing direction (positive-going crossings, negative-going crossings, or both).
Generating Poincaré Sections
Use the analysis package to extract crossing points from a trajectory array:
from hidden_attractors.analysis import compute_poincare_crossings
# Compute crossings on the z = 0 plane in the positive direction
crossings = compute_poincare_crossings(
trajectory,
plane_normal=(0.0, 0.0, 1.0),
plane_offset=0.0,
direction="positive"
)
Plotting Poincaré Sections
The plotting module renders the discrete points clearly:
from hidden_attractors.plotting import plot_poincare_section
plot_poincare_section(
crossings,
output_path="outputs/analysis/poincare_z0.png",
x_axis="x",
y_axis="y",
title="Poincare Section at z = 0",
color="#8b5cf6",
s=4.0
)
Reading the Map
- Single Point: Represents a periodic orbit of period 1.
- N Points: Represents a sub-harmonic periodic orbit of period N.
- Closed Loop: Indicates quasi-periodic behavior (torus).
- Fractal Set: Confirms chaotic behavior (strange attractor).