项目作者: alecstem

项目描述 :
This project attempts to model the structure of an ant nest (specifically some fire ant species) using a L-system and some additional parameters.
高级语言: C++
项目地址: git://github.com/alecstem/ant-lsystem.git
创建时间: 2021-03-06T23:26:21Z
项目社区:https://github.com/alecstem/ant-lsystem

开源协议:MIT License

下载


L-System Encoding of Ant Nest Architecture




Description

This project attempts to model the structure of an ant nest (specifically some fire ant species, such as the Pogonomyrmex badius or Pheidole morrisii) using an L-system and some additional parameters.

Some variable info

Variable Explanation
MAX_LENGTH Defines the maximum length of shafts between chambers
AXIOM_ITERATIONS How many times the rules of the L-system are applied.
MAX_CHAMBER_SIZE Defines the maximum radius of each chamber.
PROB Probability of a chamber being built
PROB_DECAY The amount that the probability decreases after every iteration.

L-system definitions, other things to know

  1. L-system encodes these instructions:
  2. L = rotate left by random angle underneath the surface
  3. R = rotate right by random angle underneath the surface
  4. F = move forward (from 0 to MAX_LENGTH) at present heading
  5. [] = save/load states
  6. B = build a chamber based on probability
  7. axiom : 'F'
  8. rules : F->initial string
  9. Misc:
  10. 1: probability of chamber building decreases as the depth increases
  11. 2: the interval of rotation reduces as probability of chamber building decreases
  12. 3: execution of L-system string ends when chamber building probability is below 10%