This is a Plugin For Rhinoceros Grasshopper.
Personal Research based on digital fabrication studio.
Collaborator: Zhang Yuxiang.
Role: Programmer
Time: 2016.9-12

This is a Grasshopper plug-in for agent-based modelling based on Physarum Polycephalum. It is a stigmergy algorithms similar to ant colony algorithm.

Physarum polycephalum, literally the “many-headed slime”, is a slime mold that inhabits shady, cool, moist areas, such as decaying leaves and logs. P. polycephalum is one of the easiest eukaryotic microbes to grow in culture, and has been used as a model organism for many studies involving amoeboid movement and cell motility. For example, a team of Japanese and Hungarian researchers have shown P. polycephalum can solve the Shortest path problem. When grown in a maze with oatmeal at two spots, P. polycephalum retracts from everywhere in the maze, except the shortest route connecting the two food sources.

English computer scientist Jeff Jones have research into the formation of this fascanating creature. Recently, he published From Pattern Formation to Material Computation. In this book he adopted a synthesis approach and a mobile multi-agent system with very simple individual behaviors employed. The presented model reproduces the biological behavior of Physarum; the formation, growth and minimization of transport networks. Supplementary material can be found here.

Based on Prof. Jones’s Processing program, I put it to 3D and wrote this plugin for Rhino/Grasshopper. I add some new settings to gain more artistic expression. I am still working on it so that physarum can run on a mesh.

View the source code on Github.

This plugin comes from my design studio at School of Architecture, Tsinghua University. Here are some of our works on Behance using this plugin. Of course we have fabricated some shapes generated by this plugin.

If you find any bugs or have any feature requests please post them on the GitHub Issue Tracker which will allow everyone to see which bugs are open or closed and allows me to update you when it is fixed.

To install:

  • In Grasshopper, choose File > Special Folders > Components folder. Save the gha file there.
  • Right-click the file > Properties > make sure there is no “blocked” text
  • Restart Rhino and Grasshopper

Learn to get started, please check these examples.

The algorithm adopted Jeff Jones’ model and added some my invented rules, as illustrated in following diagram.


And the code map for this plugin is


The plugin finally looks like:


Yuxiang Zhang and I created some shapes with this plugin.

ginza2 highrise one-and-three-chairs david_-_the_coronation_of_napoleon_and_josephine_-_detail1


2 thoughts on “Physarealm

  1. Jared说道:

    The example file “5. field_interconnect_with_millipede_optimization” has an error in the C# component that reads “error: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index (line: 0)”. I have seen a number of other people with the same error, but I can’t find a solution online. The only change I made to the example file was enabling the “Topostruct 3D Solver” component which did not correct the error message.


邮箱地址不会被公开。 必填项已用*标注