Skip to content

Strange Attractor

Introduction

Strange attractors transform chaotic differential equations into elegant, rhythmic visualizations. By simulating the trajectory of a point through 3D space based on mathematical rules, you can create complex, organic structures that define the "shape" of chaos.

Key capabilities:

  • Math-driven Art: Visualize classic systems (Lorenz, Rossler) or invent your own equations.
  • Dual Rendering Modes: Switch between CPU-based high-quality trails and GPU-accelerated massive particle clouds.
  • Cinematic Control: Full timeline integration for camera moves and parameter animation.

Interface Overview

Controls are organized into four main inspector panels on the right:

  1. Geometry: Define the governing equations (dx, dy, dz) and spatial transform.
  2. Parameters: Define custom constants (e.g., sigma, rho) used in your equations.
  3. Settings: Configure simulation physics (time steps, particle count, integrator).
  4. Appearance: Style the visuals (color palette, dot size, trail length).

Configuration Guide

1. Geometry (The Math)

This is where you define the vector field.

  • dx / dy / dz: The differential equations defining the velocity at position $(x, y, z)$.
    • Supported variables: x, y, z, t (time).
    • Supported functions: sin, cos, tan, exp, log, sqrt, abs, etc.
    • Example (Lorenz):
      • dx: sigma * (y - x)
      • dy: x * (rho - z) - y
      • dz: x * y - beta * z
  • Scale / Offset: Adjust the size and position of the attractor in the scene.
    • Tip: Strange attractors vary wildly in scale. Use Scale to fit it within the camera view.

2. Parameters (Custom Constants)

Instead of hardcoding numbers in your equations, define them here.

  • Add Parameter: Create named variables like a, b, sigma.
  • Usage: Use these names directly in the Geometry equations.
  • Live Tuning: Change these values during playback to animate the attractor's shape.

3. Settings (Simulation Physics)

Controls how the system evolves over time.

  • Render Mode:
    • CPU: Best for Lines & Trails. Supports smooth, anti-aliased trails with variable thickness. Ideal for high-quality video export. Limited particle count (recommended < 10,000).
    • GPU: Best for Massive Point Clouds. Uses GPGPU to simulate millions of particles. Trails are disabled in this mode. Ideal for real-time performance and fluid-like density effects.
  • Particle Count: Number of independent agents in the system.
  • Time Step (dt):
    • dt_min / dt_max: The integration step size. Smaller values = more accurate but slower.
    • sub_steps: Number of physics updates per render frame. Increase this to speed up the simulation speed without losing numerical stability.
  • Warmup:
    • warmup_steps: Number of steps to simulate before the first frame is drawn. Essential for placing particles "on" the attractor.
    • stagger_min / stagger_max: Randomizes warmup length per particle. Prevents particles from bunching up in a single synchronized clump.
  • Initialization:
    • Bounds: Defines the X/Y/Z min/max coordinates for the spawn volume.

4. Appearance (Visual Style)

  • Dot Size: Diameter of the particle head.
  • Palette: A list of colors. Particles are assigned colors from this list based on their index (gradient mapping).
    • Tip: Use the "Randomize" button to generate harmonic color schemes.
  • Trails (CPU Mode Only):
    • show_trails: Toggle trail rendering.
    • trail_lifetime: How many seconds of history to keep. Warning: Long lifetimes (>15s) with many particles consume massive RAM.
    • line_weight: Thickness of the trail.
    • fade_trails: If enabled, trails become transparent as they age.

Performance & Best Practices

GoalRecommended Settings
High Quality VideoCPU Mode. particle_count ~2,000. trail_lifetime 5-10s. sub_steps 5-10.
Real-time FlowGPU Mode. particle_count 100,000+. sub_steps 2.
Sharp DetailsDecrease dt (e.g., 0.005) and increase sub_steps.
Smooth StartSet warmup_steps to at least 100 to avoid the "explosion" from the initial random box.

Troubleshooting

  • System Explodes: The integration step dt is likely too large for your equation's energy. Reduce dt_max.
  • Choppy Trails: Increase sub_steps or reduce simulation speed.
  • Out of Memory: Reduce trail_lifetime or switch to GPU mode (which doesn't store trail history).

Media

All rights reserved.