//-------------------------------------- Quadrilateral transformations
// The arguments are double[8] that are mapped to quadrilaterals:
// x1,y1, x2,y2, x3,y3, x4,y4
public bool quad_to_quad(double[] qs, double[] qd)
{
Perspective p = new Perspective();
if (!quad_to_square(qs))
return false;
if (!p.square_to_quad(qd))
return false;
multiply(p);
return true;
}