q has the coordinates of quadrilateral. I can get the output below with brute-force but I want to find a simpler solution, perhaps something like f<-q[[1;;2]]
.
Initializations
f[x_, y_] = {{1, 2}, {3, 4}}.{x, y} + {5, 6};
q = {{1, 1}, {3, 1}, {3, 2}, {1, 2}}
Want: better way for this, perhaps in some matrix form?
f[1, 1]
f[3, 1]
f[3, 2]
f[1, 2]