Boids: Difference between revisions
Content added Content deleted
(Sorry, but these are not implementations of the task) |
|||
Line 32: | Line 32: | ||
=={{header|Java}}== |
=={{header|Java}}== |
||
See [[Boids/Java]] |
See [[Boids/Java]] |
||
=={{header|Phix}}== |
|||
The standard distribution includes demo\arwendemo\boids3d.exw which shows a resize-able 3D cube |
|||
with between 0 and 200 boids, optionally with shadows, and dynamically adjustable speed, separation, and neighbor radius |
|||
settings. It is two source files totaling 750 lines of code (but alas currently windows 32 bit only). |
|||
=={{header|Racket}}== |
|||
{{incomplete|Racket|This is a link but not an on-site implementation.}} |
|||
[http://hashcollision.org/whalesong/examples/boid/boid.html Here] is the result. |
|||
The Whalesong compiler was used to compile [http://hashcollision.org/whalesong/examples/boid/boid.rkt the Racket source] into JavaScript. |
Revision as of 22:20, 31 July 2016
Boids is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
A Boids algorithm simulates the flocking behavior of birds. This task requires the creation of a graphical or purely textual simulation of a flock of birds navigating the cave with obstacles depicted below.
.......###############............................................................... .......###############............................................................... ......#################.............................................................. O......###############............................................................... OO.....###############............................................................... OO.....###############....................#.........................#................ OO......#############...................#####...................#########............ OO......#############...................#####..................###########........... OO.......###########...................#######................#############.......... OO.........#######......................#####................###############......... OO............#.........................#####...............#################........ OO........................................#.................#################........ O...........................................................#################........ ............................................................#################........ ...........................................................###################....... ............................................................#################........
If you implement a purely textual simulation, this is a possible board representation, where "O" are the boids that should go toward the right, "#" are fixed walls that should be avoided by the boids, and "." is free space (using a space is also acceptable for free space, if you add some kind of frame around the board).
A simulation that doesn't contain obstacles but only shows flocking behavior is acceptable.
- See also
C
See Boids/C
Java
See Boids/Java