Painting Boids Retrospective

So, I took a lot of the feedback from today to heart. And even though today was the final presentation for biologically inspired systems, I felt super motivated to improve my program when I got home.

Anywho, here is a video of my program as it stands right now.

The biggest change I incorporated was the color gene. I was struggling with how to incorporate color this weekend. Mainly, how was I going to incorporate a gene that would allow the boids to be different from each other, but still cohesive. However, today during VIZA616 (Rendering and Shading) while Ergun was lecturing on interpolating colors with different hues for our shaders, I realized that I could interpolate between two colors to create color palettes for the boids. I incorporated that into a color picker for the user to manually choose the two colors. However, I completely agree with Phil’s comment about incorporating this into a gene, especially since this is a biologically inspired system. Plus taking away those extra sliders made my interface significantly more simple.

I interpreted my previous color picker idea into six new color genes: hue, hue-variation, saturation, saturation-variation, value, and value-variation. The HSV values would define the mid-color. The variation values would indicate the amount the respective value would vary within the boid system. I set limits to ensure the values stayed between 0 and 1.

So here is a list of my final boid genes:

  • Behavior: separation, alignment, and cohesion force coefficients
  • Shape: height and width of the triangle
  • Color: hue, saturation, value, hue variation, saturation variation, and value variation

Each category has it’s own mutation coefficient slider in order to allow the user more control over the mutation in each generation. I feel like this is appropriate considering the amount of genes.

I also added some minor changes. The mutation sliders are hidden in Canvas Mode. The “No Paint Trail” mode boids are now drawn with a thicker stroke, so they are more readable. The boid simulation also doesn’t restart when this mode is toggled.

I know there is much more than can be further done. Especially to make the GUI itself more aesthetically pleasing. I already plan on fixing the control panel on either a separate window or perhaps on a semi-transparent background. That way there won’t be that awkward line at the top of the boid’s canvas.

Overall, especially with the most recent changes, I am quite pleased with how this project turned out. It is incredibly fun to play with. And I am loving the resulting paintings.

I will try to get a web app up, once I can figure out the best way to do so.

Here are some more screenshots!






(Forgot to show “No Paint Trail” in Mutation Mode in the video above, so here it is below!)

Just thought I would add my source code if anyone was curious.

As I had stated in a previous post, I used the flocking example on as a starting point.

Unfortunately, WordPress restricts the file types that can be uploaded. I was able to upload my .pde and .csv file as a .doc:



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s