codepens/another-branching-strategy-svg
Dym Sohin f132183c1d init 2023-10-06 23:12:53 +02:00
..
dist init 2023-10-06 23:12:53 +02:00
src init 2023-10-06 23:12:53 +02:00
README.markdown init 2023-10-06 23:12:53 +02:00
license.txt init 2023-10-06 23:12:53 +02:00

README.markdown

Another Branching Strategy | SVG

A Pen created on CodePen.io. Original URL: https://codepen.io/DonKarlssonSan/pen/zYoGejE.

Click to generate a new random image!

The lines are not allowed to intersect.

My previous attempt is using recursion. I was not 100% happy with the results, the tree look unbalanced because the branches are drawn from the root to end, giving the posibility for one branch to occopy a lot of space. https://codepen.io/DonKarlssonSan/pen/yLVNBrz

This algorithm on the other hand uses a for loop instead of recursion, forcing it to draw all branches of the same level in one sweep.

Buy a unique Crypto Art (NFT) on OpenSea: https://opensea.io/collection/branching-strategy/