Using $3$ points create new coordinate system and create array of points on $XY$ plane in original coordinate system This is my first post on stack exchange :) Basically what I am trying to do is something called palletizing in the robotics world.  Given $3$ points I would like to create a new coordinate system and then create a lattice structure of points on the new $XY$ plane, but I would like the final coordinates of the points on the $XY$ plane to be in the original coordinate system.  I found this link HERE which does almost exactly what id like.
Any help is much appreciated.

Here is a possible approach to your problem. Let  $A$, $B$, and $C$, be the 3 points of interest.
1. Define your coordinate system by three orthogonal unit vectors with $A$ as the origin. Perhaps defined as
$V_1 = \frac{B-A}{\|B-A\|}$
$V_2 = \frac{V_1 \times (C-A)}{\|V_1 \times (C-A)\|}$
$V_3 = V_1 \times V_2$
2. Define your lattice in the new coordinate system.
3. Calculate the transform between your original coordinate system and your new coordinate system defined by $V_1, V_2,$ and $V_3$.
4. Transform your points in the lattice from your new coordinate system to your old coordinate system.
