Skip to content

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Indexes
  • Laboratory
  • RSS Feed

Perlin Ants

2008-10-28 John Winkelman

Perlin Ants with visible terrain

Click here to launch the ants.

Click the left square to generate a new terrain map.
Click the right square to show and hide the terrain map.

This is kind of a mash-up between bits and pieces of some previous experiments – the terrain from the tile-based game, and the ants from the Langton’s Ants experiments.

Basically, what is happening here is this: A thousand “ants” are created and placed in random locations on the screen, facing in random directions. Each turn, each ant moves forward one pixel. If the color of the new pixel is lighter than the previous pixel, it turns a bit widdershins. If the new pixel is darker, it turns a bit clockwise.

The ants end up tracing something like contour lines, and seem to be “attracted” to sections where the color of the terrain varies significantly over a small area.

I threw in a bit of a blur to make things more interesting visually.

Enjoy!

Posted in ProgrammingTagged cellular automata, Flash

Post navigation

Tile Game With Location Detection
Perlin Ants In Color

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Personal website of
John Winkelman

John Winkelman in a diner in San Francisco

Archives

Categories

Posts By Month

October 2008
S M T W T F S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Sep   Nov »

Links of Note

Reading, Writing
Tor.com
Locus Online
The Believer
File 770
IWSG

Watching, Listening
Writing Excuses Podcast
Our Opinions Are Correct

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2023 Ecce Signum

Proudly powered by WordPress | Theme: x-blog by wpthemespace.com