
Drawing with boids - miniatureape
https://miniatureape.github.io/boiddraw/
======
robotresearcher
Context: Boids is the name of a classic flocking model by Craig Reynolds.

[https://www.red3d.com/cwr/boids/](https://www.red3d.com/cwr/boids/)

------
codetrotter
I initially thought that it didn't work because it was just a black screen.
Perhaps include a little text box that tells the user that they need to draw
something with their mouse.

~~~
koonsolo
I had the same problem. Already closed that tab until I read this.

------
miniatureape
Hi, I made this. Thanks for looking.

In case anyone is interested, if you open the console there are some
instructions for scripting your own drawings.

(p.s. Thanks for all the suggestions)

------
tomxor
This is a lovely idea.

Emergent simulations are my favorite part of compsci, turning it towards an
artistic purpose seems like a good pairing, I might steal it and try my luck
with CA or something :)

[edit]

After playing for a bit I feel like it might be good to have the boids number
and age limit a little higher by default (there is no correct setting of
course, but it probably helps people get an intuition for what it's doing).

Also increasing max speed makes it much more expressive.

------
nafizh
Can someone please explain what is it doing? I thought it was giving whatever
you draw, a more artistic expression, but it seems it does not preserve the
original content.

~~~
Everlag
Without looking at the code, it looks like its using a steering algorithm[0]
to move a series of 'boids'(each individual stroke) along the path you define.
A boid is controlled by a number of forces, as in the physics sense. By
varying starting conditions for each boid, you get the dispersion that is seen
on all figures but straight lines.

If you take a look at the options(hamburger menu in the top left) you'll see a
bunch of options. For example, 'maxForce' is the maximum magnitude of force
that can be exerted on a boid for a period of time; this is noticeable if you
draw two large 'C's, one with maxForce at min and one at max. I'd recommend
cranking up 'boidSize' if you want to get a clearer idea of what's an
individual boid is doing.

Steering behaviors are used in a lot in games. For example, A* will give you a
great path that looks terribly robotic. Using a steering behavior, perhaps
'seek' towards each path node then 'arrive' at the end of the path, you get
significantly more organic movement.

[0]
[https://www.red3d.com/cwr/steer/gdc99/](https://www.red3d.com/cwr/steer/gdc99/)

------
metaprinter
oooh, you an play with the settings from the hamburger menu

