I want to improve on the flower I created for the midterm to make the branches grow smoothly as users change the height. Previously if the height of the branches was changed the branches would get recalculated due to the randomness I added to my visualization.
MAIN BRANCH
To improve this, I have to create a new method in the class to draw all of the branches possible first, then map it to the slider input. I tried refactoring the main branch first and drew all of the branches first in the create() method during setup(), then calculated the growth of the branch based on the slider input.
Screen Recording 2024-04-03 at 2.18.47 PM.mov
SUB-BRANCHES
I tried multiple ways to create the natural branching visuals like I had for my midterms while still having the branches grow like above, but most of them seemed to be stuck in an endless loop. The only way that I could get new branches from each segment is to create a loop to draw the branches, but the sub-branches will end up having the same animations and values because itβs drawn in a loop instead of generated at the start.
Screen Recording 2024-04-04 at 11.03.08 AM.mov