> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://playgramming.sketchpad.cc/sp/pad/view/ro.Md9UEYsPlWC/rev.609
 * 
 * authors: 
 *   Devon Scott-Tunkin

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



// Pressing Control-R will render this sketch.

float angle = 0;

void setup() {  // this is run once. 
  size(400, 400);
  rectMode(CENTER);

  for (int count = 0; count < width; count = count + 10;)
  {
    line(count, 0, count, width);
  }
  for (int count = 0; count < height; count = count + 10;)
  {
    line(0, count, height, count);
  } 
  for (int countY = 0; countY < width; countY = countY + 10;)
  {
    for (int countX = 0; countX < height; countX = countX + 10;)
    {
        ellipseMode(CORNER);
        ellipse(countX, countY, 10, 10);
    } 
  }
  for (int countY = 0; countY < width; countY = countY + 10;)
  {
    for (int countX = 0; countX < height; countX = countX + 10;)
    {
        triangle(countX - 5, countY + 5, countX, countY - 5, countX + 5, countY + 5 );
    } 
  }     

  
  for (int count = 0; count < 50; count = count + 1;)
  {
  pushMatrix();
  translate(width / 2, height / 2 );
  rotate(count);
  scale(2, 2);
  rect(0, 0, 50, 50);
  popMatrix();
  }
  
  
} 

void draw() {  // this is run repeatedly.
  //background(120); 
  //angle += 0.1;
  angle = angle + 0.1;
 
  pushMatrix();
  translate(width / 2, height / 2 );
  rotate(angle);
  scale(2, 2);
  rect(0, 0, 50, 50);
  popMatrix();
 
  pushMatrix();
  translate(width / 2, height / 2 );
  rotate(radians(45));
  rect(0, 0, 20, 20);
  popMatrix();
}