Visual Navigation by Looming Simulation

As a small project for my Inventive Thinking class, I worked on a simulation of creatures avoiding each other or performing tasks like crossing a street or forming a swarm. The creatures navigate by choosing simple actions (like turning right or left) based on the "Looming" principle of obstacle avoidance studied by my thesis advisor, among others. The simulation runs in your web browser (Firefox or recent IE have been tested, but probably others as well). You can view it (fun to watch) and play with the parameters to your heart's content at this link: Looming Simulation

I wrote the simulation in Javascript; tutorials on JS animation by Scott Schiller were a great help. Quite apart from any scientific value, this project made my Javascript understanding much deeper. If anybody wants to hack on this, just download the following files from the directory

  • index.html
  • animate.js
  • loom.css
  • sprite.gif
  • sprite-collide.gif
  • sprite-satisfied.gif
The last three are just the images, of course, and can be replaced with anything you want - just remember to change the size in animate.js for collision detection to work.

Add a Comment