🔬 Framework Architecture
The ObserverPhysicsEngine is a unified framework that simulates reality through different observational lenses. Each observer type uses the same underlying particle system but interprets and renders it differently.
⚡ Physics Defaults
Population Size: 100 particles - Balance between visual richness and performance
Evolution Speed: 1x - Real-time simulation rate
Connection Distance: 80-150px - Varies by observer type
Computational Budget: 100 - Adaptive quality scaling
🎯 Observer-Specific Parameters
Quantum: Ghost particles orbit at 20px ± 12px radius
Classical: Trails store 30 frames of history
Social: 5 clusters with in-group connections only
Conscious: Prediction error decay: α=0.7, surprise rate: 5%
Thermodynamic: Temperature range: 20-170, ambient: 50
Relativistic: Speed of light: c=3 pixels/frame, velocity boost: 2.5x
Probabilistic: Variance update: α=0.98
⚡ Relativistic Causality (NEW!)
In relativistic mode, connections represent causal structure in spacetime, not just spatial proximity.
Causal Horizon: c × timeWindow = 3 × 20 = 60 pixels
This represents "how far can light travel in our observable time window"
Connection Types:
🔵 Timelike (Blue): Inside light cone (d < 60px) + moving toward = causally connected in PAST
🟡 Timelike (Yellow): Inside light cone (d < 60px) + moving apart = causally connected in FUTURE
🔷 Lightlike (Cyan): On horizon (d ≈ 60px ± 3) = at light speed, simultaneous
⚪ Spacelike (Gray dashed): Beyond horizon (d > 60px) = NO causal connection!
Mathematics:
Spacetime interval: Δs² = c²Δt² - Δx² - Δy²
• Timelike: Δs² < 0 → Can exchange signals (causal)
• Lightlike: Δs² = 0 → Light-speed separated
• Spacelike: Δs² > 0 → Causally disconnected
Why This Matters: In relativity, only timelike-connected events can influence each other. Spacelike events are absolutely independent!
🧮 Core Physics Equations
Force Calculation: F = 0.01 * evolutionSpeed / (distance + 1)
Thermal Noise: noise = 0.02 * evolutionSpeed
Velocity Damping: v *= 0.99 per frame
Max Velocity: 3 pixels/frame
📊 Telemetry Metrics
Shannon Entropy: Grid resolution 5-20 (adaptive), calculated as S = -Σ p log₂ p
Temperature: T = √(kinetic_energy) * 0.1
Uncertainty: Δx * Δp (position × velocity variance)
Free Energy: F = U - TS (potential - temperature×entropy)
🎨 Rendering Pipeline
1. Clear canvas (#0a0e27 background)
2. Update spatial grid for connections
3. Draw connections with observer-specific filtering
4. Render observer effects (ghosts, trails, glows, etc.)
5. Draw particles with observer-specific coloring