Alright, so I decided to experiment a bit with my flocking cellular automata system inspired by Jared Tarbell. And I am definitely liking the results!! I guess I have a thing for moving line exposures.
My system has a small number of boids (for these iterations I played around 10-15). Each boid has one of the following states :
- “Loneliness” (0 neighbors): alignment and cohesion forces applied
- “Contentment” (1-2 neighbors): no motion
- “Anxiety” (>2 neighbors): separation forces applied
Here is the basic structure of my program:
while (boids are not all content){
- update boid positions
- draw
}
Iteration I:
- Boids generated from center image
- Linear link drawn between each boid
Iteration II:
- Boids generated from random point
float fx = (0.1*randomGaussian()+ 0.5) * width;
float fy = (0.1*randomGaussian()+ 0.5) * height; - Linear link drawn between each boid
Iteration III:
- Boids generated from random point
- Curvilinear link drawn between each boid
Iteration IV:
- Boids generated from random point
- Curvilinear link drawn between each boid
- If line has not moved from previous frame, line is drawn with a lower opacity (this is to help get rid of those opaque black lines that develop when line hasn’t moved for a while)
2 thoughts on “Flocking Cellular Automata”