I have these txt files with the transformation matrixes between units. Each line is a row of the matrix and the columns are separated with ','.
MMc2PXc.txt
In the end the following operation is done to convert units
(xn, yn) = unit n
(xm, ym) = unit m
3x3 Matrix [a,b,c; d,e,f; g,h,i]
xm = (axn + byn + c) / (gxn + hyn + i)
ym = (dxn + eyn + f) / (gxn + hyn + i)
How would I implement the reading of the matrix to do these operations in bonsai? Or should we just use a python script?
Use a CsvReader node with %f,%f,%f as a scan pattern.
One way to turn it into a matrix is to just assemble it in an Float[][]. Then use ExpressionTransforms or the Index operator to access its elements.
I have these txt files with the transformation matrixes between units. Each line is a row of the matrix and the columns are separated with ','. MMc2PXc.txt
In the end the following operation is done to convert units
(xn, yn) = unit n (xm, ym) = unit m 3x3 Matrix [a,b,c; d,e,f; g,h,i]
xm = (axn + byn + c) / (gxn + hyn + i) ym = (dxn + eyn + f) / (gxn + hyn + i)
How would I implement the reading of the matrix to do these operations in bonsai? Or should we just use a python script?