• attempts
  • succesful
  • unsuccesful
  • unused ends
  • rejected
successful branches before rejecting roots
draws
  • Trunk
  • ×4
  • ×2
  • ×1
  • ×0.8
  • ×0.6
  • ×0.4
App Info
Sprouting Leaves

v0.4.2-autumn-version

Just had some luck with an unintended outcome

Manual

A refresh will do the trick

v0.4.1 > 0.4.2-autumn-version changes

  • Start with some more organic form, the top doesn't look like a Grace Jones haircut anymore
  • Sprouts are in diffent shapes, well not realy sprouts anymore, see below
  • And then something went wrong with the rotations of the sprouts and suddenly it looked like an autumn gust did the final blow to the past leaves. Just perfect. To finish it I alterd the colours so it was more an autumn leaves pallet

What does the script do?

  1. Start with 2 base coordinates
  2. Draw the trunk (bit random) from the 2 coordinates to the root
  3. Calculate 5 other coordinates, with some randomness to make it more organic. And while calculating:
    1. Check what size to draw; Step by step (based on how many successful branches) the branches become smaller
    2. Check if a new coordinate occurs in the not to use coordinates Set()¹ If it occurs then skip to a new attempt
    3. Check if the script draw enough branches and if so start rejecting the unsuccessful coordinates (after one last attempt
  4. Determine a (bit smaller) square of the object and put all coordinates of that square in the Set()¹
  5. Draw the 4 lines
  6. Delete the used coordinates couple from the array
  7. Put the 2 new coordinates couples in the array for later use
  8. Pick one unused coordinates couple, and start again from step 2. Repeats 1000 times. And if that number is hit:
    1. try every unused couple once more (with the smallest branch
    2. if still no luck reject the couple
    3. if it results in another branch the two new couples goes into the unused couple pool
    4. This is repeated till all open end are rejected
    5. Add sprouting leaves on all unused coordinates

¹ A Set() is used because it only store unique values by default

Other Versions