Categories
3. Generative Thing

Generative Thing – Ahmad Almohtadi

Upon doing some basic google searches of random art on processing and p5js, I stumbled upon this unicorn, which was made using only triangles. The triangle-based leaves of my sunflower were inspired by this.

Unicorn: https://openprocessing.org/sketch/582870

I wanted something that is simplistic, symmetric and just appealing to the human eye so I decided to go for a sunflower. The variation ideas came along as I started to code. I laid down some rough sketches of the leaves first as those were the initial part of my design. I had to figure out a nice way of laying the triangles and I did that through trial and error of multiple sketches. After that, I had some coordinates noted down for the triangles (this was done alongside some coding). Then the idea of the random yellow seed pattern came up and I had some difficulty figuring out a code for that. I noted down the aspects that I want to vary randomly. 

The final decision was made so that the aspects I am varying are reasonably doable for a class project. As for the chances of the variations occurring, they are as follows:

  • There is 9.99% chance of the background being black, otherwise it is white.
  • The leaves can be rotated 45 degrees to be diagonal. This can happen only 9.99% of the time. The other times, the leaves are standard (on the axes).
  • There is a small 6.66% of the evil eye appearing in the middle of the flower, otherwise it is a variation of yellow seeds. The yellow seed positions are also randomized.
  • As for the stem, the standard color is green, but there is a 6.66% chance of a golden stem with a red outline and an 8.88% chance of a blue stem.

Link to code:

https://editor.p5js.org/AhmadAlmohtadi/sketches/Pow37R2QO