Closed alexpi closed 3 years ago
https://eloquentjavascript.net/code/#15.2 has a "look at the solution" button that'll show my solution.
Yes, I am aware of that. I was asking about the alternative way to solve it, as you write inside the hint: "Another interesting effect can be achieved by modeling a simple physics system."
I won't have time to debug your solution, and you didn't specify how the effect differs from what you were going for, but at a glance, your definition of speed seems very different from how it tends to be defined in physics (where motion is speed × time, and speed is changed by acceleration based on forces—for example by a simulated spring between the particles and the mouse position.)
Ok, thanks for the hints.
Hi,
I am trying to solve this exercise creating the alternative effect suggested in the hint. My version works, but the motion produced is not exactly the one required. Any suggestions or a solution?