The forms rotate clockwise, while the colors rotate counterclockwise.
p5.js code:
/* Oppositional Rotations
The forms rotate clockwise,
while the colors rotate counterclockwise.
November 6, 2021 */
let ang = 0;
function setup() {
createCanvas(377, 377);
noStroke();
rectMode(CENTER);
colorMode(HSB, 360, 100, 100, 1);
}
function draw() {
background(0);
fill(0);
// rect(width / 2, height * 3 / 4, 25, height / 2);
for (let n = 0; n < 360; n += 10) {
petal(width / 2, height / 2, 144, 34, TWO_PI * n / 360 + frameCount / 60, color((frameCount * 3 + n) % 360, 100, 100, 0.5));
}
}
function petal(x, y, w, h, angle, f) {
push();
translate(x, y);
rotate(angle);
fill(f);
ellipse(w / 2, 0, w, h);
pop();
}
This sketch was composed subsequent to this discussion: