I am trying to create a simple whirlpool simulation, where particles are constantly compelled to move towards a point in a whirlpool like fashion.
To do this I do the following (in sudo code)
variable speed = 1.0 //This can vary to speed things up
Rotate by (70 * speed) degrees
Move Forward (4 * speed) Steps
Point Towards center
And this works quite nicely, however as the particles get nearer to the center it breaks down causing there to be an area where they just circle around never getting closer to the center. The larger the speed variable is the larger the radius is that they begin to not move closer to the center.
If one decreases the rotate by to a value of like 50 degrees the anomaly is much smaller, however the points rotate around the center many less times.
Why is this happening? How can I fix this?
I am open to completely changing the method I use even if it means physics, however polar coordinates will not work because of the way the center moves among other simulation reasons.