User:Nan Wang/counting: Difference between revisions

From XPUB & Lens-Based wiki
(Replaced content with "http://payload90.cargocollective.com/1/8/283859/4112701/ccc_900.jpg http://payload90.cargocollective.com/1/8/283859/4106757/nan_900.jpg http://www.openprocessing.org/sketch/...")
No edit summary
Line 1: Line 1:
<canvas id="c0" showsrc>
function draw() {
  c = document.getElementById("c0");
  ctx = c.getContext('2d');
  // rows of streets
  for (r=0; r<8; r++) {
    ctx.save();
    for (c=0; c<10; c++) {
      // a single housing unit
      ctx.strokeRect(0, 0, 10, 10);
      ctx.translate(10, 0);
    }
    ctx.restore();
    ctx.translate(0, 30);
  }
}
</canvas>
http://payload90.cargocollective.com/1/8/283859/4112701/ccc_900.jpg
http://payload90.cargocollective.com/1/8/283859/4112701/ccc_900.jpg
http://payload90.cargocollective.com/1/8/283859/4106757/nan_900.jpg
http://payload90.cargocollective.com/1/8/283859/4106757/nan_900.jpg


http://www.openprocessing.org/sketch/73805/check
http://www.openprocessing.org/sketch/73805/check

Revision as of 15:00, 18 October 2012

<canvas id="c0" showsrc>

function draw() {

 c = document.getElementById("c0");
 ctx = c.getContext('2d');
 // rows of streets
 for (r=0; r<8; r++) {
   ctx.save();
   for (c=0; c<10; c++) {
     // a single housing unit
     ctx.strokeRect(0, 0, 10, 10);
     ctx.translate(10, 0);
   }
   ctx.restore();
   ctx.translate(0, 30);
 }

} </canvas>


ccc_900.jpg nan_900.jpg

http://www.openprocessing.org/sketch/73805/check