⚙️ Advanced Gear Train Problem Visualizer
Google Foobar Challenge: Engineering the Perfect Gear Ratio
🎯 Input Configuration
Peg Positions (comma-separated):
🔍 Analyze & Visualize
▶️ Animate
⏹️ Stop
📚 Example Configurations
Classic (3 pegs)
Simple (2 pegs)
Even (4 pegs)
Linear (5 pegs)
Extreme Gap
Fibonacci-like
Powers of 2
×3 Growth
Large Scale
Prime Gaps
❌ Invalid
❌ Too Close
⚡ Animation Controls
Show Speed Labels
Show Mathematical Formula
Speed:
1.0x
🎮 Challenge Mode
Start Challenge
Random Problem
Mathematical Formula:
For n pegs at positions p₁, p₂, ..., pₙ:
r₁ = 2 × Σ((-1)ⁱ × (pᵢ₊₁ - pᵢ)) / k
where k = 3 for even n, k = 1 for odd n
0
Total Teeth
0
Gear Ratio
0
Mech. Advantage
0
Total Distance