hunar4321 / particle-life

A simple program to simulate artificial life using attraction/reuplsion forces between many particles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature request] Animated parameter change over time.

sebbes333 opened this issue · comments

In the "Control panel" on the left, it would be cool if the parameters could slowly animate towards random values, so it's possible to see how everything in the system changes when the parameters change over time.

For example:
You click on the "Animate" button (Better name?), and it randomly generates a "Target value" for each slider.
Then the slider value SLOWLY (like 0.001 speed or random speed, or something) moves towards that target value.
When the slider reaches the target area, it waits for some time, then a new target value is chosen & it restarts moving towards THAT new target value instead.

Different sliders will have different distances to their target value,

  • you could either allow the system to generate new target values for that slider whenever that slider reaches its target (after some delay?),
    OR, you can "sync" up the system in (at least) 2 ways:
  • Wait for ALL sliders to reach their targets before generating new targets for all sliders (with a delay, just to see if the system stabilizes).
  • Or, just after generating the targets, it measures the distance needed to travel, and adjusts the travel speed for each slider to be exactly the speed needed for every slider to reach its target at the same time (eg. 20 seconds from now, all sliders will reach the target).

Preferably there would be an option to toggle between all these 3 "sync" options, but that's maybe wishing too much?