Re:Interactive Double Pendulum Playground
by Evidlo on Wednesday October 08, 2025 @02:10PM
(#45518965)
Just made a PR
Re:Interactive Double Pendulum Playground
by magicalhippo on Thursday October 09, 2025 @02:17AM
(#45524146)
I considered it, but had to go to work and I figured since the last commit was over 4 years ago it might just sit there idly, so I skipped it.
But no, PR was merged in short order. Lesson learned.
Re:Interactive Double Pendulum Playground
by cabirum on Friday October 10, 2025 @06:20AM
(#45537196)
Hn shows this story is 3 hours old, yet your GitHub PR was made 2 days ago, linking here?
The story has been reposted to HN via the “second-chance pool”, which resets the dates.
So, what else might be wrong I wondered. Well, it seems to move in the wrong direction... so I checked how the pendulum is displayed. And sure enough, I think there's a sign error:
Note how the upper bob uses ang0 while the lower one has -ang1. Meanwhile the physics derivation assumes both angles are against the vertical, so have same sign.Changing -ang1 to ang1 does indeed make the pendulum move in a natural way, except now dragging it is flipped. Ie you drag it left and it moves right. Another sign error in setLowerBobPos. Fixing that as well it now works as I'd expect.
[1]: https://dassencio.org/46
[2]: https://lpsa.swarthmore.edu/NumInt/NumIntFourth.html##sectio...