Home

Twitter

Github

Exploring the Differential Growth Algorithm

An experiment on custom input parameters

Diving into a new algorithm can often feel overwhelming, with its myriad terms and equations. But it doesn’t have to be that way. With the interactive potential of modern websites, we can transform learning experiences from static and daunting to dynamic and engaging.

One such algorithm is the differential growth algorithm. While there are several excellent blog posts explaining its mechanics (thanks to Jason Webb and Inconvergent), I felt there was a missing element of playfulness. The parameters of this algorithm are much easier to understand when you can see their effects in real-time rather than just reading about them. This inspired me to create an explorable explanation of the differential growth algorithm.

To facilitate this interactive learning, I have prepared a playground where you can adjust the parameters and immediately observe their effects. This hands-on approach can demystify the algorithm and make the learning process more intuitive and enjoyable.

The differential growth algorithm revolves around four main parameters:

  1. Alignment Force: Each node applies a force to maintain a straight line with its connected nodes, promoting orderly growth.
  2. Repulsion Force: Each node applies a force to keep a distance from other nodes, preventing overcrowding.
  3. Repulsion Radius: This defines the detection radius within which the repulsion force is applied to other nodes.
  4. Node Distance: This parameter governs the behavior based on node proximity. If nodes are closer than the minimum distance, they merge into one node. Conversely, if nodes are farther apart than the maximum distance, a new node is created between them.

Try experimenting with these parameters in the interactive playground to see how each one influences the algorithm's behavior. This way, you can grasp the concepts more effectively than through static explanations alone.