I made an animated rubbery graph thing in JS. It creates a random graph and the edges have set lengths, and they push and pull at the vertices because they want to stay that length. It turns out that of you write such a program, the graph will develop linear and angular momentum as an emergent effect, because any force that isn't resisted by an equal and opposite force within the graph will cause the entire graph to move or turn.
Conversation
Notices
-
🇳🇴 Thor — backup account (thorthenorseman@octodon.social)'s status on Monday, 27-Aug-2018 18:26:34 EDT
🇳🇴 Thor — backup account
-
🇳🇴 Thor — backup account (thorthenorseman@octodon.social)'s status on Monday, 27-Aug-2018 18:40:26 EDT
🇳🇴 Thor — backup account
Because linear momentum made the graph drift off the screen, I had to add some code to recenter it after every frame. I don't know if there is a solution to the angular momentum. It's much easier to measure and subtract translation than rotation.
-