from Ancient Greek phýllon "leaf" and táxis"arrangement"


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”.


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.

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).

Source code