public static void main(String[] args){
		
		/**
		 * example
		 * */
		int times = 1;
		ThreadMXBean bean = ManagementFactory.getThreadMXBean();
		long start = bean.getCurrentThreadCpuTime(), end;	
		Line l = new Line(new int[]{ 0, 100, 0}, new int[]{100, 0, 0});
		end = bean.getCurrentThreadCpuTime();
		System.out.println("For init:\t" + (end -start) / 1000000.0 + " ms");
		Point Q = new Point (1, 1, 0);
		//System.out.println("area: " + Point.Areax2(l.o_pL, l.o_pH, Q.doublePoint()));
//		l.GenerateVeryfyPart(Q, false);
//
//		for(int i = 0; i < times; i++){
//			if(l.ClientVerify(Q)){
//				//System.out.println("Pass verification");
//			}else{
//				System.err.println("fail verification");
//			}
//		}
//		System.err.println("===========================");
		double[][] data ={
				{3,	4,	3},
				{1,	2,	6},
				{3, 1, 4},
				{6,	1,	5},
				{7,	2,	10},
				{8,	1,	10},
				{6,	6,	13},
				{3,	7,	15},
				{7,	7,	13}
				};
		for(int i = 0; i < data.length; i++){
			if(i == 3) continue;
			l = new Line(new int[]{(int)data[i][0], (int)data[i][1], (int)data[i][2]}, new int[]{6, 1, 5});
			
			Q = new Point (4, 4, 0);
			//System.out.println("area: " + Point.Areax2(l.o_pL, l.o_pH, Q.doublePoint()));
			if(i == 0 || i == 2)l.GenerateVeryfyPart(Q, true);
			else l.GenerateVeryfyPart(Q, false);
			start = System.currentTimeMillis();	
			System.out.print("id : " + i + " ");
			if(l.ClientVerify(Q)){
				System.out.println("Pass verification");
			}else{
				System.err.println("fail verification");
			}
		}
		
		
		l = new Line(new int[]{3, 1, 4}, new int[]{6, 1, 5});
		
		Q = new Point (4, 4, 0);
		//System.out.println("area: " + Point.Areax2(l.o_pL, l.o_pH, Q.doublePoint()));
		l.GenerateVeryfyPart(Q, true);
		start = System.currentTimeMillis();	
		for(int i = 0; i < times; i++){
			if(l.ClientVerify(Q)){
				System.out.println("Pass verification");
			}else{
				System.err.println("fail verification");
			}
		}
		DataOutputStream dos;
		try {
			dos = new DataOutputStream(new FileOutputStream(new File("./tmp/line")));
			l.writeToFile(dos);
			dos.close();
			DataInputStream dis = new DataInputStream(new FileInputStream(new File("./tmp/line")));
			l.readFromFile(dis);
			dis.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}