/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.sH-hsJ9iBW6/rev.3714
*
* authors:
* Sofiya Shakeel
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
angle=0;
speed=0.2;
float sizeA = sin(radians(PI)) * 300;
float sizeB = cos(radians(frameCount)) * 300;
int i=90;
void setup(){
size(500,500);
background(0);
stroke(random(255),random(100),random(100),i);
strokeWeight(1);
}
void draw(){
noFill();
translate(width/2,height/2);
rotate(angle);
triangle(0,0,sizeA+100,sizeA,sizeB,sizeB-100);
angle+=1;
i+=1;
if(i>50)
{
i=90;
}
}