Using Jason Webb’s and the following papers (1, 2) as a baseline. This involves having a bunch of nodes, these are the points that have already grown, and attractors (places which the nodes are growing towards). Each attractor then has a field of influence, for each of those nodes we calculate the average direction acting on the node. Draw the next segment, place our new nodes, and then finally kill off the attractors if a node get’s to close to it (and repeat).to make a to make some leaf like, tree like and maybe even different types of natural shapes and formation. Using
- Place attractors
- Associate the attractors with nearby nodes (within some attraction radius/field of influence). For now only take the NEAREST node
- Iterate through the nodes and grow the network (segment length)
- If two nodes would collide we do not add the new node (collision radius)
- Kill the attractors (kill radius)
- Prune any lone nodes (nodes which never became associated with an attractor) after a few counts
To do this we build a
util directory for use in this algorithm. The gets built at the beginning of every iteration. When doing the searches for the
Each source node will inherit it’s color from it’s parent node (in this iteration of the algorithm)
For this iteration we will just draw a circle for every node.
Using the QuadTree and Getting the Initial Algorithm Right
Random attractors with one seed node at the center
Attractors placed along circles
Attractors are placed along circles with a few starting nodes. Starting with 1 circle then adding more
Adding Rectangles, lines and randomizing the center locations
| | | | ——————————————————————————————————————————————— | ——————————————————————————————————————————————— |
Associating each seed node with a color
More color palettes
Some different drawing styles
Bringing the segment lengths closer together
I made some improvements to the draw speed by using groupBy to group the nodes by their color and draw all of those nodes together. It still has issues drawing fast, but that seems to be due to some inefficiency in how the QuadTree look-ups are working.
segment length attraction radius collision radius kill radius attractor node seed node
- Refactor so that we used a doubly linked list so we can determine the number of children or who the parent is.
- Opacity and thickness effects based on node size
- Batch the circle drawing by color introduced in
- Draw paths not dots
- gradient based on attractor color and node color.
- Add boundaries, and obstacles
- Define the terms in the #Glossary