float displace1(Point ul, Point ur, Point ll, Point lr, float smooth){
		
//		gen++;
		
		if(ll.y - ul.y <= 1) return 0;
		
		Point lmid = midpoint(ul,ll),
				rmid = midpoint(ur,lr),
				tmid = midpoint(ul,ur),
				bmid = midpoint(ll,lr),
				center = midpoint(midpoint(ul,ur),midpoint(ll,lr));
		
		float tlh = get(ul), trh = get(ur), blh = get(ll), brh = get(lr), mid = 0.5f;
		
		if(get(center) != 0.5f){
			mid = (tlh + trh + blh + brh)/4 + ((float)Math.random()-0.5f) * smooth;
			set(center,mid);
		}
				
		float lmidh = (tlh + blh)/2 + (float)(Math.random() - 0.5f) * smooth * 0.005f, //left midpoint height
				rmidh = (trh + brh)/2 + (float)(Math.random() - 0.5f) * smooth * 0.005f, //right midpoint height
				tmidh = (tlh + trh)/2 + (float)(Math.random() - 0.5f) * smooth * 0.005f, //top midpoint height
				bmidh = (blh + brh)/2 + (float)(Math.random() - 0.5f) * smooth * 0.005f; //bottom midpoint height
		
		set(lmid,lmidh);
		set(rmid,rmidh);
		set(tmid,tmidh);
		set(bmid,bmidh);
		
		smooth *= .5;
		
		new Thread(new Displace(ul,tmid,lmid,center, smooth)).start();
		new Thread(new Displace(tmid,ur,center,rmid, smooth)).start();
		new Thread(new Displace(lmid,center,ll,bmid, smooth)).start();
		new Thread(new Displace(center,rmid,bmid,lr, smooth)).start();
		
		return mid;
		
	}