Algorithms for making interesting organic simulations

https://news.ycombinator.com/rss Hits: 10
Summary

Algorithms for making interesting organic simulations The purpose of this article is to explain techiques that enabled me to make simulations like the one below, along with a lot of other organic looking things. We will focus on algorithmic techniques for artistic purpose rather than scientific meaning. 1. Physarum algorithm from Jeff Jones (2010) Jeff Jones presented a simulation algorithm that reproduces the behavior of organisms such as Physarum polycephalum. It is explained in this paper. Results typically look like this: (source: screenshots from implementation by Amanda Ghassaei) General principle The basic idea is that particles (also called agents) move around, leaving a trail behind them and trying to follow the trails they detect. Below is an interactive explanation of a single agent, without representing the trail update. Please don't mind the glitch after slider change :) Detailed description of the algorithm A large number of agents move in a 2D space. At each iteration of the algorithm, agents deposit trail on an image called a trail map, just by adding a value to a pixel of the image. In the above illustration, each cell represents a pixel of the trail map image. Agent attributes: 2D position (x,y) orientation: an angle called heading Here are the different steps for an iteration of the algorithm: 1. Sensing: Each agent "looks" at three places: straight ahead, slightly right, and slightly left. sometimes not so slightly The distance from the agent to the 3 sensor places is defined by the parameter Sensor Distance (SD). The side angle is a parameter called Sensor Angle (SA). The agent detects the trail intensity at those three positions/pixels. 2. Rotation and movement: If the highest value is to the left or right, the agent turns in that direction. The turn angle is controlled by the parameter Rotation Angle (RA). If the highest value is straight ahead, the agent doesn't rotate. Actually in the case where straight ahead is the lowest value, the agent ...

First seen: 2025-07-16 05:05

Last seen: 2025-07-16 14:09