Skip to content

Ecce Signum

Immanentize the Empathy

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

Tag: Langton’s Ants

Another New Old Project: Langton’s Ant

2020-09-142022-05-06 John Winkelman

Click here to see Langton’s Ant in the Labs.

I probably could have posted this project before the 3D version, but the 3D version was already done in Javascript, and besides: 3D is just cool!

The above screenshot is taken at just over 10,000 iterations into the animation. Langton’s Ant will, if undisturbed, create a “highway” which will proceed off into infinity unless the world it is crawling wraps at the edges, as this one does.

If you have seen one Langton’s Ant animation you have probably seen them all, though in this one I added a heat map which shows the number of times the Ant has visited each cell. It will take a while to begin to see different colors, and everything will look blue for quite some time. The above screenshot of the heat map was taken at approximately 100,000 iterations.

As with all of my experiments, all of the code is contained in a single page for easy download and modification. I did not use any external libraries and I commented the Javascript for ease of reading and interpretation. Enjoy!

Posted in ProgrammingTagged cellular automata, Javascript, Langton's Ants comment on Another New Old Project: Langton’s Ant

A Blast From the Past: Langton’s Ant in 3D

2020-09-08 John Winkelman

Langton's Ants in 3D

This is an update to a post from March 2, 2012.

From 2002 to around 2012 I devoted most of my creative energy to programming. I created well over a hundred visual toys and simple games, and kept the momentum going until a series of life events sucked the mental and emotional energy from me. When I got my life back I turned my creative energies to writing fiction and poetry, and my decade-plus of experiments in mathematics, geometry, cellular automata and game design fell by the wayside.  Most of those experiments were in Flash and though I still have the source code rebuilding them in Javascript would be an extremely time-consuming project.

But some of those experiments were in Javascript, particularly after I saw the writing on the wall for Flash and Actiosncript. This is one of those experiments – a 3D version of the Langton’s Ant cellular automation, created using hand-rolled Javascript, with an assist from the Three.js 3D rendering library.

Click here to access the Langton’s Ants in 3D experiment. Once there, you can right-click on the animation and select “save image as…” to take a screenshot of the Ant trail.

The original post from March 2, 2012, with code breakdown and explanation is here.

Here are a couple more screenshots from later iterations of the algorithm:

Langton's Ants in 3D

Langton's Ants in 3D

Posted in ProgrammingTagged cellular automata, Javascript, Langton's Ants comment on A Blast From the Past: Langton’s Ant in 3D

Personal website of
John Winkelman

John Winkelman in a diner in San Francisco

Archives

Categories

Posts By Month

March 2023
S M T W T F S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Feb    

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