Phyllotaxis

This animation is based on Daniel Shiffman tutorial on phyllotaxis.

I modified the original code to mask a background image, and to change the parameters for the so-called divergence angle (according to mouse X position), and the size of the initial “seed”.

Examples

C Divergence angle Example
8.92 -14.24 example
5.67 -41.42 example 2
8.93 162.70 example 3

The Shining

Here I used again the still from the movie The Shining as the background, and created several images, varying the parameter c from 4 to 12, and finally uploading the images to Giphy.

gif

How to run

Open PSunflower.pde in Processing. To play with other images, add them to the data folder and change the code with loadImage():

  img = loadImage("model_1.png");

Use keyboard arrows to adjust the two main parameters of this composition:
LEFT, RIGHT: Decreases/increases the size of the initial seeds
DOWN,UP: Decreases/increases the divergence angle (angle_0)