### Into the vortex

I jotted down an idea for a little program the other day:

You put a few random points on the screen.  Call these the "centers."  Now these centers determine a slope field: any other point on the screen is assigned a particular slope based on it's position relative to the centers.  Specifically, I thought a slope almost perpendicular to the segment between a given point and its nearest center would be interesting.
As predicted, each center gets a lovely spiral.  It would be nicer if the spirals were made from continuous paths though, so introduced agents that move along leaving trails as they go.  When an agent falls into a center, it is magically transported to a new random location.  Here's what the agents have produced after a short while.
It reminds me of some of the cloud motifs I've seen in Asian art.  But I didn't like the sharp angles that the trails made when passing from one center's influence to another's.  What if the agent considered the two closest centers when calculating its next move?
If one center were much closer, we would want to ignore the second closest, but if the two centers were the same distance from the agent, they should affect the trail equally.  This should smooth out those sharp angles and do away with the straight lines that show up in the design, right?
Well, it smoothed out the transitions between two nearby centers, but now the linear artifact shows up as an agents move from one pair's influence to another's.  The only real fix would require the agents to consider positions of all the centers as they move along.  Like objects affected by the gravity of all other objects.