- attempts
- succesful
- unsuccesful
- unused ends
- rejected
successful branches before rejecting roots
draws
- Trunk (at step 0)
- ×4 (at step 0)
- ×2 (at step )
- ×1 (at step )
- ×0.8 (at step )
- ×0.6 (at step )
- ×0.4 (at step )
App Info
Sprouting Leaves
v0.4.3
This is a work in progress version, it might work it might not. Check previous version(s).
Manual
A refresh will do the trick
v0.4.1 > 0.4.3 changes
- Did some significant tweaking with some calculations of 'where not to draw anymore'
- bigger and relatively more tree like draw space, so the script does not end up every single time with a Grace Jones haircut 😏
- Show/hide options now look like buttons so it's more clear what they do
- Sprouts are now different shapes and comes in colours from a modest green pallete
What does the script do?
- Start with 2 base coordinates
- Draw the trunk (bit random) from the 2 coordinates to the root
-
Calculate 5 other coordinates, with some randomness to make it more organic. And while calculating:
- Check what size to draw; Step by step (based on how many successful branches) the branches become smaller
-
Check if a new coordinate occurs in the not to use coordinates
Set()
¹ If it occurs then skip to a new attempt - Check if the script draw enough branches and if so start rejecting the unsuccessful coordinates (after one last attempt
-
Determine a (bit smaller) square of the object and put all coordinates of that square in the
Set()
¹ - Draw the 4 lines
- Delete the used coordinates couple from the array
- Put the 2 new coordinates couples in the array for later use
-
Pick one unused coordinates couple, and start again from step 2. Repeats 1000 times. And if that number is hit:
- try every unused couple once more (with the smallest branch
- if still no luck reject the couple
- if it results in another branch the two new couples goes into the unused couple pool
- This is repeated till all open end are rejected
- Add sprouting leaves on all unused coordinates
¹ A Set()
is used because it only store unique values by default
Other Versions
- version 0.4.4 Work in Progress
- version 0.4.3 Dec 2 2021
- version 0.4.2-autumn-version Dec 1 2021