How theabbie/doublependulum works
Project type and purpose
• This is a single-page, client-side web application (“Double Pendulum Playground”) that runs entirely in the browser.
• Purpose: let users experiment with a double-pendulum physics simulation rendered via SVG, with real-time visualization and user‐controlled parameters.
File structure
• Top level:
• index.html – entry point containing all HTML, CSS, and JavaScript.
• .nojekyll – signals GitHub Pages to bypass Jekyll processing.
• .github/, CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE – repository metadata.
• No separate “src” or “backend” directories → the entire logic (ODE integration, UI, rendering) lives in the browser.
README for additional insights
• Describes the governing differential equations and user interaction.
• Mentions hosting on GitHub Pages: static-site deployment.
• No server-side components or microservices.
Main components and their interactions
a. Static Host (GitHub Pages)
• Hosts index.html and assets; serves them over HTTPS.
b. Browser / Client Application
• Module: Physics Engine
• Reads user inputs (masses, lengths, initial angles).
• Numerically integrates the double-pendulum ODEs each animation frame.
• Module: Renderer (SVG)
• Draws pendulum arms and bobs in an SVG tree.
• Updates positions on each simulation tick.
• Module: User Interface
• Sliders or input fields for parameters.
• “Play/Pause” controls.
c. User
• Interacts with UI controls in the browser.
Architectural patterns and design principles
• Single-Page Application (SPA) pattern, though minimal: separation of concerns between Model (physics), View (SVG), and Controller (input handlers).
• Event-driven design: user events trigger state updates → re-render cycle.
• Clear labels on each node (e.g., “Physics Engine”, “SVG Renderer”).