topical media & game development
graphic-processing-algorithm-Appendix-p328-MyGrid.pde / pde
class MyGrid{
float unit = 10;
int span = 50;
void plotXY(){
for(int x=-span; x<span+1; x+=unit)
for(int y=-span; y<span+1; y+=unit){
line(x,-span,0,x,span,0);
line(-span,y,0,span, y,0);
}
}
void plotZX(){
for(int x=-span; x<span+1; x+=unit)
for(int z=-span; z<span+1; z+=unit){
line(x,0,-span,x,0,span);
line(-span,0,z,span, 0,z);
}
}
void plotYZ(){
for(int y=-span; y<span+1; y+=unit)
for(int z=-span; z<span+1; z+=unit){
line(0,y,-span,0,y,span);
line(0,-span,z,0,span,z);
}
}
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.