Skip to content
Advertisement

How to draw colorful rotating flower in p5.js?

JavaScript
JavaScript

How can I color those leaves?

I added fill('red'), fill('blue') in front of each ellipse and somehow only one color dominates all of the petals.

Plus, I want it to rotate at a constant speed.

Advertisement

Answer

Fill seems to work fine. (and added a loop to be more concise)…

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement