import java.io.*;
/**
To run this properly, you need three arguments, otherwise the defaults will be used
i.e. run java points 300 500 50
These are source size for x, y and differnece required
*/
public class points {
String filename;
PrintWriter fileOut = null;
public static void main (String args[]) {
String arg1, arg2, arg3 ;
if (args.length != 3)
{arg1="6"; arg2="4";arg3="2"; }
else
{ arg1 = args[0];
arg2 = args[1];
arg3 = args[2];
}
/** System.out.println ("Hello small args " +
Integer.parseInt(arg1) *
Double.parseDouble(arg2));
*/
points pt = new points();
pt.init(arg1, arg2, arg3);
//ac.
}
public void init(String arg1, String arg2, String arg3) {
int x,y, xx, yy, zz, xs, xz, yz;
int s =0;
xx =Integer.parseInt(arg1);
yy =Integer.parseInt(arg2);
zz =Integer.parseInt(arg3);
//System.out.println("Print to" + filename + "xx " + xx + "yy " + yy);
try {
fileOut = new PrintWriter( new FileWriter("pointswrite.txt" ) );
} catch (IOException ioe) {};
for (x=0; x < xx;x= x+zz) {
for (y=0; y < yy; y=y+zz) {
s++;
//xs = zz + xx;
xz = x + zz;
yz = y + zz;
//System.out.println("x - y is " + x + "," + y + "," + xz + "," + yz );
String lines ="";
System.out.println ("line" + s + " " +lines);
if (lines != null) fileOut.println(lines);
}
}
fileOut.close();
}
}
//