Loading...
Logo
Processing Forum
Hi,

I am new to Processing and I don't draw that well.  When I program I need a 2d grid to show me where things start and end.  If I had an overlay in the IDE, I could create faster, but as of now it's plug in the x y axis and run the program.

It takes a long time to get the sketch to look right.

Is there a tool or library command that will give me a 2d grid to work from so I can cut my draw time?

Replies(2)

There's not a tool or library command that I know of, but this is fairly easy if you use a for loop:

Copy code
  1. int step = 50;

  2. void setup() {
  3.  size(400, 400);
  4.  background(255);
  5.  stroke(0);

  6.  for(int i = 0; i < width/step; i++ ) {
  7.    line(i*step, 0, i*step, height);
  8.    line(0, i*step, width, i*step);
  9.  } 
  10.    
  11. }

... 
(edit, redundant. thanks jesse!)

one of the tutorials recommends graph paper...