> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.YBzVklv8HPv/rev.646
 * 
 * authors: 
 *   jaruz

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



void setup(){
size(600, 300);
frameRate(25);
background(0);
}

int puntoY=150;
float angulo=0;
int coordenadaX=0;
void draw(){
    fill(0,10);
//rect(0,0,width,height);
    angulo+=0.05;
    float senoAngulo=sin(angulo);
    
    puntoY=(25+25*senoAngulo);
    coordenadaX++;
    
    translate(coordenadaX, puntoY+150);

    rotate(-angulo);
    fill(255,0,0,20);
    noStroke();
    ellipse(0,0,4,4);
    stroke(0,0,255,70);
    line(0,-50, 0, 50);
    pushMatrix();
    pushStyle();
    translate(0,50);
    rotate(-angulo*5);
    fill(150,30);
    noStroke();
    rectMode(CENTER);
    rect(0,0, 30,2);
    popStyle();
    popMatrix();
    
    stroke(0,255, 0,70);
    line(-10,0, 10, 0);
    
    stroke(255);
    strokeWeight(2);
    point(0,0);
    if(coordenadaX>width) noLoop();


}