function [xyW] = trans3rdpoly(xy,Trans)
% Apply a 3rd order polynomial transformation to a set of points
% x and y are the x and y coordinates of the points to be warped
% Trans is the 3rd order transformation to apply

x=xy(:,1);
y=xy(:,2);
xyW=[ones(length(x),1)  x  y  x.*y  x.^2  y.^2  y.*x.^2  x.*y.^2  x.^3  y.^3]*Trans;
