> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://codigodelaimagen.sketchpad.cc/sp/pad/view/ro.cQC0TZvrPGf/rev.36
 * 
 * authors: 
 *   emilio gonzález villegas

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



// This sketch builds on a prior work, "ejercicio2", created by emilio gonz&#225;lez villegas
// http://codigodelaimagen.sketchpad.cc/sp/pad/view/ro.BFV6Nb7qeA9VV/rev.19


//contador, en processin la numeración de frame va bien

int width=500;
int height=500;


void setup(){
size(500, 500);
background(255);
colorMode(RGB, 255);
frameRate(1);
smooth();
}
float angulo;
void draw(){
  //line(0,width/2,0,height/2);
  fill(0);
  stroke(0,0,0);
  rect(10,30,20,30);
  fill(255,0,0);
  text(frameCount,20,50);
  
  fill(0);
  stroke(0,0,0);
  rect(30,30,40,30);
  fill(255,0,0);
  text(frameCount/60,50,50);
  
    angulo+=PI/30;
   // angulo++=PI/300;
    translate(width/2, height/2);
    rotate(angulo);
   // float seno=sin(angulo);
 
    //stroke(random(255), 255, 255, 100);
    float limiteLinea=-100;
    //+frameCount/2;
    stroke(255);
    strokeWeight(55);
    
    line(0,0,0,limiteLinea+50);
    stroke(0);
    strokeWeight(1);
    
   // line(0,0,height,0);
   stroke(230);
    line(0,0,0,-width);
    
    stroke(0);
    line(0,0, 0, limiteLinea);
   // if(limiteLinea>width) noLoop();
   
    String[] coleccion={"1","2","3","4"};
    
    PFont fontA = createFont("Times New Roman",24,  true);
    textFont(fontA, 36);
   
    fill(0);
    textSize(12);   
    textAlign(CENTER);
    float anguloP;
    anguloP=2*PI;
   //text(coleccion[0],0,limiteLinea-10);
   text(frameCount/60,10,0);
   strokeWeight(1);
   point(0, limiteLinea+frameCount);
if(angulo<=anguloP)text(frameCount,0,limiteLinea-10);
if(angulo>anguloP)stroke(150,0,0);

if(angulo>anguloP)line(0,0, 0, limiteLinea-40);

if(frameCount>60)stroke(200,0,0);
if(frameCount>60)text(frameCount,0,limiteLinea-40);

if(angulo>anguloP*2)line(0,0, 0, limiteLinea-60);


if(frameCount>120)stroke(225,0,0);
if(frameCount>120)text(frameCount,0,limiteLinea-60);
if(angulo>anguloP*4)line(0,0, 0, limiteLinea-80);
if(frameCount>180)stroke(235,0,0);
if(frameCount>180)text(frameCount,0,limiteLinea-80);
if(angulo>anguloP*8)line(0,0, 0, limiteLinea-100);
if(frameCount>240)stroke(245,0,0);
if(frameCount>240)text(frameCount,0,limiteLinea-100);
if(angulo>anguloP*16)line(0,0, 0, limiteLinea-120);
if(frameCount>300)stroke(255,0,0);
if(frameCount>300)text(frameCount,0,limiteLinea-120);
if(frameCount>=360)noLoop();

fill(255,255,255,200);
noStroke();
if(frameCount>=60)rect(0,limiteLinea-20,15,15);
if(frameCount>=120)rect(0,limiteLinea-50,15,15);
if(frameCount>=180)rect(0,limiteLinea-70,15,15);
if(frameCount>=240)rect(0,limiteLinea-90,20,15);
if(frameCount>=300)rect(0,limiteLinea-110,25,15);
if(frameCount>360)rect(0,limiteLinea-130,30,15);
stroke(0);


/*fill(100);
if(angulo<=anguloP)text(coleccion[1],0,limiteLinea-10);
noFill();*/
/*float[] angulos={PI, HALF_PI, TWO_PI, QUARTER_PI};
for(angulo=HALF_PI)text(coleccion[1],0,limiteLinea-10);
/*float tres=anguloP;*/
/*boolean sonTres=anguloP;
if(sonTres=true){
  text(coleccion[1],0,limiteLinea-10);
}else{
  noFill();*/
}
//if(angulo>=anguloP+0.05)noFill();

  


void mousePressed(){
  frameRate(1);
  stroke(random(255),0,0,0);
  float limiteLinea=-100;
  line(0,0, 0, limiteLinea);
  
}
void mouseReleased(){
  frameRate(10);
}