edit link
fullscreen link
My idea was to create a phenakistoscope but it was a bit challenging, because I kinda forgot how does the rotate function work. ( working with circle-ish thing is always difficult! alas! my math is just terrible
I do have one draft/ iteration. I guess I am most confused about why the spinning wings have the mustard-ish color, while the circle in the middle has the grey color (that i put in the zoetrope function??
I also do want the wings/ zoetrope to expand then extract, however, I think I failed.
p5js edit link
fullscreen link
References and other notes:
- differences between let & var : https://editor.p5js.org/benmoren/sketches/kASilaWhC
- (for W7’s assignment, potential reference): https://www.instructables.com/A-Modern-Take-on-the-Phenakistoscope/
Yelena Ye says
solving the questions I had above:
/////////////////////////
// using true or false //
/////////////////////////
if (increase) {
w += 5;
h += 5;
if (w > 300 && h > 300) {
increase = false;
}
} else {
w -= 5;
h -= 5;
if (w < 0 && h < 0) {
increase = true;
}
}
/////////////////////////
// using a variable ////
/////////////////////////
w = w+ speedW;
h = h+ speedH;
if ( w<0 || h300 ||h>300){
speedW *= -1;
speedH *= -1;
}
// this statement means that once it reaches the limit, it will start to move in the other direction