#include "geometry.h"


//----------------------------------------------------------
ofVec3f interpolatePt(ofVec3f pts[4], float pctx, float pcty){


	// .... it's like this:
	// 3 2
	// 0 1 
	
	ofVec3f diffx0 = pts[1] - pts[0];
	ofVec3f diffx1 = pts[2] - pts[3];
	ofVec3f ptx0 = pts[0] + pctx * diffx0;
	ofVec3f ptx1 = pts[3] + pctx * diffx1;
	
	return ( (pcty)*ptx0 + (1-pcty)*ptx1);

}

