Skip to content

This Repository contains the interactive simulation of Langton's Ant.

License

Notifications You must be signed in to change notification settings

Alpha-Blitz/Langton-s-Ant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Langton's Ant 🐜

This Repository contains the interactive simulation of Langton's Ant. 🐜

  • Description: This repository contains an index.html file and a sketch.js file which can be viewed on the local server.

  • About the simulation: The canvas starts with a square grid, click anywhere to spawn the ant. And if the ant is already spawned and on the grid, click anywhere to change the ant's position. There are two slider on the top left, the first one can be used to change the ant's speed (antsteps/frame) range 1 to 40 units. Second one can be used to change the framerate (frames/second) range 1 to 80 units.

  • Optional: The square grid is easily scalable, this can be done by changing the value of variable sqLen in line 5 (in sketch.js). The constraints on sqLen: The value should be a factor of both canvas height and canvas width. The value should be even.

  • References: Langton's ant, p5js

About

This Repository contains the interactive simulation of Langton's Ant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published