{"id":32891001,"url":"https://github.com/pietras333/n-mass-points-pendulum-simulator","last_synced_at":"2025-11-10T03:02:51.872Z","repository":{"id":321633698,"uuid":"1086607916","full_name":"pietras333/n-mass-points-pendulum-simulator","owner":"pietras333","description":"A scientific and visual exploration of multi‑pendulum dynamics, inspired by research on chaotic motion of coupled pendulums.","archived":false,"fork":false,"pushed_at":"2025-10-30T17:05:13.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T18:34:25.270Z","etag":null,"topics":["langrangian","mathematics","pendulum-simulation","physics-simulation","rk4-algorithm","science","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pietras333.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-30T16:44:44.000Z","updated_at":"2025-10-30T17:06:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pietras333/n-mass-points-pendulum-simulator","commit_stats":null,"previous_names":["pietras333/n-mass-points-pendulum-simulator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pietras333/n-mass-points-pendulum-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietras333%2Fn-mass-points-pendulum-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietras333%2Fn-mass-points-pendulum-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietras333%2Fn-mass-points-pendulum-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietras333%2Fn-mass-points-pendulum-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pietras333","download_url":"https://codeload.github.com/pietras333/n-mass-points-pendulum-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pietras333%2Fn-mass-points-pendulum-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283614275,"owners_count":26864945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-10T02:00:06.292Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["langrangian","mathematics","pendulum-simulation","physics-simulation","rk4-algorithm","science","unity3d"],"created_at":"2025-11-10T03:01:01.237Z","updated_at":"2025-11-10T03:02:51.865Z","avatar_url":"https://github.com/pietras333.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌀 N‑Mass Points Pendulum Simulator\n\nA **scientific and visual exploration** of multi‑pendulum dynamics, inspired by research on chaotic motion of coupled pendulums. This simulator models pendulums with **3 or more masses**, solves their motion using rigorous physics, and provides a **real‑time visualizer** with velocity‑based trails.\n\u003cimg width=\"1897\" height=\"865\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6961164f-861e-45b8-9047-e2682c039f9e\" /\u003e\n\n\nhttps://github.com/user-attachments/assets/b223f54b-6794-428a-9f7e-16db154b0dfc\n\n\n---\n\n## 🔬 Research Basis\n\nThis project is grounded in scientific research and builds on key references:\n\n- **D. Assêncio**, *“Double pendulum: Hamiltonian formulation”* ([Link](https://dassencio.org/33))  \n  Derivation of double pendulum equations from Hamiltonian/Lagrangian mechanics.\n\n- **J. Jiménez‑López \u0026 V.J. García‑Garrido**, *“Chaos and Regularity in the Double Pendulum with Lagrangian Descriptors”* ([arxiv](https://arxiv.org/html/2403.07000v1?utm_source=chatgpt.com))  \n  Quantification of chaos using Lagrangian descriptors.\n\n- **B. Yesilyurt**, *“Equations of Motion Formulation of a Pendulum Containing N-point Masses”* ([arxiv](https://arxiv.org/pdf/1910.12610?utm_source=chatgpt.com))  \n  General formulation for **n‑mass pendulums**, providing the framework used for simulations with 3 or more masses.\n\nKey points from these works implemented:\n\n- Equations of motion derived from **Lagrangian / Hamiltonian mechanics**.  \n- **Double pendulum (n = 2)**: classical coupled nonlinear ODEs.  \n- **Multi-mass pendulums (n ≥ 3)**: generalized via mass matrix and coupling terms (see `PendulumSolver.cs`).  \n- **Runge‑Kutta 4th order (RK4)** integration with configurable sub-steps for stability and accuracy.  \n- Sensitivity to initial conditions and emergence of chaotic dynamics naturally appear in simulations.\n\n---\n\n## 🧮 Mathematics Behind It\n\n\u003cimg width=\"767\" height=\"224\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4b5b7149-3663-4a8f-a8c1-9c7f6bc55ef5\" /\u003e\n\n\n- **Double pendulum (n = 2)**:  \n\n- **General n‑mass pendulum (n ≥ 3)**:  \n\n\n- **Integration**: RK4 with `subSteps` per frame:  \n\n- **Chaos and energy**: Following Jiménez‑López \u0026 García‑Garrido, chaos fraction depends on energy, mass ratios, and length ratios.\n\n---\n\n## 🎮 Features\n\n- ✅ Supports **3 or more pendulum masses**  \n- ✅ Real-time visualization with **velocity-based trail colors**  \n- ✅ Custom shader for smooth, colorful trails  \n- ✅ Adjustable **rod width**, **mass radius**, **trail length**, and **velocity gradient**  \n- ✅ Sensitive dynamics, allowing chaos and regularity studies  \n\n---\n\n## ⚙️ Usage\n\n1. Open the project in **Unity**.  \n2. Add `PendulumSolver` and `PendulumFullRenderer` to an empty GameObject.  \n3. Configure mass points (`Mass`, `AttachedRodLength`, `InitialAngleDegrees`, `AngularVelocity`).  \n4. Adjust `subSteps` in `PendulumSolver` for numerical stability.  \n5. Customize visual parameters in `PendulumFullRenderer` (trail length, gradient, rod width, mass radius).  \n6. Press **Play** to simulate and visualize pendulum motion.\n\n---\n\n## 🎨 Visualization\n\n- Trails colored by instantaneous angular velocity.  \n- Rods connecting masses with configurable colors and widths.  \n- Mass points rendered as spheres, with color indicating speed.  \n- Z-offsets per mass ensure distinct trails for multiple pendulums.\n\n---\n\n## 📚 References\n\n- Assêncio, D., *Double pendulum: Hamiltonian formulation*, https://dassencio.org/33  \n- Jiménez‑López, J. \u0026 García‑Garrido, V.J., *Chaos and Regularity in the Double Pendulum with Lagrangian Descriptors*, arXiv:2403.07000  \n- Yesilyurt, B., *Equations of Motion Formulation of a Pendulum Containing N-point Masses*, arXiv:1910.12610  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpietras333%2Fn-mass-points-pendulum-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpietras333%2Fn-mass-points-pendulum-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpietras333%2Fn-mass-points-pendulum-simulator/lists"}