Phototropism: First iteration

Done using processing.

In this example, the light source is coming from the right. Hence the tree branches out towards the right. They are created from adding branches from previous branches, with the trunk being the first “branch”.

At the end of each branch, there is a 60% chance for the next branch to grow to the right, and 20% to the left and another 20% to the middle. This is done by generating a random number between 0 – 1 and if statements.

A route (from the trunk to the first branch, to the second… to the last) is completed first before the next route starts. Each route is entirely probabilistic.

For future exploration:

Currently, the implementation of a “light source” is only through defining the probabilities of growing right, left and center. I would like to be able to define a light source. The probability of growing towards the light source will depend on the distance the previous branch is from the light source. Closer = greater probability of growing towards it.

Also, currently, I am using a predefined angle of 30 deg when it branches out. I’d like to use the position of the light source as reference for the direction the branch should grow towards

4 Replies to “Phototropism: First iteration”

1. dejan.grba says:

Rachael, this is a good start, and all the observations you have made for enhancement and further development are relevant, so please go on and address them.

Once you do that, you can go further, by creating an external object in Processing, which generates the growth factor (or growth influence) similar to a light source in nature such as the Sun. The influence of this object can then be varied, for example by moving it around the stage with the mouse, and by controlling its strength via keyboard or on-screen slider.

Moving forward, you can add more than one light source object with different characteristics, time-based variability (like

2. dejan.grba says:

…the actual sunlight, etc.

For further development, you may try to expand your system into a 3D space. You can do all this in Processing.

I hope this helps.

3. dejan.grba says:

Since we had no time to do progress update on your exploratory generative studies in the online class last week, please post it here before Tuesday 22 September 11:59 PM so I can give you some more feedback before you finish it up for the class next week.

If you need to discuss it live before next class, do let me know so we can set up a quick Zoom meeting.

At the latest, of course, post your final version before Wednesday 23 September 11:59 PM.