Facebook
From kartik kumbla, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 100
  1. size(500,500);
  2. background(255);
  3.  
  4.  //int c = 255;
  5.  //int o = 0;
  6.  
  7.  //grid size change
  8. int g =50;
  9.  //grid
  10.  int h=0;
  11.  int i=0;
  12.  for ( int a = 0; a<= g; a++){
  13.    for ( int b = 0; b<= g; b++){
  14.      rect( h,i,width/g,height/g);
  15.      h= h+width/g;
  16.    }
  17.    i=i+height/g;
  18.    h=0;
  19.  }
  20.  
  21. stroke(0);
  22. strokeWeight(3);
  23. line(width*0.5,0,width*0.5,height*1);
  24. line(0,height*0.5,width*1,height*0.5);
  25.  
  26. for (float x = 0; x<height; x = x+(width*0.05)) {
  27.      line(width*0.49,x,width*0.51,x);
  28.      for ( float y = 0; y<width; y = y+(height*0.05)){
  29.         line(y,height*0.49,y,height*0.51);
  30.      }
  31. }
  32. float p=width*0.5;
  33. float q=height*0.5;
  34. stroke(0,0,255);
  35. strokeWeight(width*0.016);
  36. point(p,q);
  37.  
  38. fill(0,0,255);
  39. triangle(width*0.5,height*0.01,width*0.49,height*0.02,width*0.51,height*0.02);
  40. triangle(width*0.5,height*0.984,width*0.49,height*0.974,width*0.51,height*0.974);
  41. triangle(width*0.01,height*0.5,width*0.026,height*0.49,width*0.026,height*0.51);
  42. triangle(width*0.99,height*0.5,width*0.964,height*0.49,width*0.964,height*0.51);
  43.  
  44.  
  45. fill(255,0,0);
  46. text("0",width*0.516,height*0.53);
  47. float f =height*0.45;
  48.  for( int u=1; u<=10; u=u+1){
  49.    text(u,width*0.472,f);
  50.    f = f-(height*0.05);
  51.  }
  52.   f = height*0.55;
  53.  for( int u=-1; u>=-9; u=u-1){
  54.    text(u,width*0.462,f);
  55.    f = f+(height*0.05);
  56.  }
  57.  f = width*0.432;
  58.  for( int u=-1; u>=-9; u=u-1){
  59.    text(u,f,height*0.48);
  60.    f = f-(width*0.05);
  61.  }
  62.  f = width*0.54;
  63.  for( int u=1; u<=9; u=u+1){
  64.    text(u,f,height*0.48);
  65.    f = f+(width*0.05);
  66.  }
  67. save("Activity12.png");