Skip to content
Ecce Signum

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Laboratory

Langton’s Ant 3D, Version 1

2008-10-02 John Winkelman

Langton's Ant in 3D space

Click here to see the ant in new amazing 3D action.

My first attempt at moving Langton’s Ant into a 3D grid. The 3D part was easy – just add some Z movement to the existing X and Y pattern.

This is what you are looking at: there are 100 cells in the X (left and right) and Y (up and down) plane, and 25 in the Z (toward and away from the viewer) plane. There is one bitmap for each Z level, making for 25 stacked bitmaps. The bitmap in which the ant is currently moving is set at 100% opacity, with the surrounding bitmaps becoming increasingly opaque until they are almost transparent. When the experiment seems to flicker, it is because the ant is rapidly switching between Z levels. Those long horizontal “roads” the ant makes are probably more like tubes when viewed in 3D space.

Making the ant move in an interesting pattern is a little more difficult. In 2D (X,Y) space, from each point the ant can either turn left or right, and move forward one space, depending on the state of the cell to which the ant moves. That means, using initial conditions, the ant will move in a perfect square: up 1, left 1, down 1, right 1, and end up back at the original square. In order for me to make that work in 3D space, the ant must visit each of eight cells, forming a cube, and return to the original cell without doubling back on itself. The current experiment does not do that, thus the long horizontal runs.

Right now there are 18 rules for the ant’s movements. Each of these rules is iterated through, based on the color of the cell on which the ant lands. Landing on an “off” cell causes the ant to move according to the next rule. Landing on an “on” cell causes the ant to move according to the previous rule. If I implement multiple “on” colors, then I can cut the movement rules down to 6, but I will need to have each rule account for the color of the cell in which the ant currently resides.

Look for more iterations on this problem in days to come.

Posted in ProgrammingTagged cellular automata, Flash

Post navigation

Lil’ Gamera
Langton’s Ant 3D, Version 2

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 »

Twitter Feed

JohnWinkelmanJohn Winkelman@JohnWinkelman·
9 Apr

Yeah, that would have been a totally different movie.

Alex de Campi@alexdecampi

Clockwork Orange, hat test, 1971

Reply on Twitter 1380494051548487681Retweet on Twitter 1380494051548487681Like on Twitter 1380494051548487681Twitter 1380494051548487681
JohnWinkelmanJohn Winkelman@JohnWinkelman·
9 Apr

5 of 5 stars to How to Be an Antiracist by Ibram X. Kendi https://www.goodreads.com/review/show?id=3914846425

Reply on Twitter 1380333038945591296Retweet on Twitter 1380333038945591296Like on Twitter 1380333038945591296Twitter 1380333038945591296
JohnWinkelmanJohn Winkelman@JohnWinkelman·
5 Apr

4 of 5 stars to How to Dress a Fish by Abigail Chabitnoy https://www.goodreads.com/review/show?id=3922597309

Reply on Twitter 1379031329006833664Retweet on Twitter 1379031329006833664Like on Twitter 13790313290068336641Twitter 1379031329006833664
Load More...

Links of Note

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

Watching, Listening
WYCE Electric Poetry
Writing Excuses Podcast
Our Opinions Are Correct

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

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

© 2021 Ecce Signum

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