Im trying to translate and rotate a set of coordinates using a transformation matrix (calculated by another program) in AnyBody, but the resulting coordinates are different from what they should be.

This for eg. is the transformation matrix
a d g j
b e h k
c f i l
0 0 0 1

And this is the syntax that I used:
AnyFunTransform3DLin transformation=
{
ScaleMat = {{a,b,c},
{d,e,f},
{g,h,i}};
Offset = {j,k,l};
};

When I manually calculated the new coordinates using the same transformation matrix and plotted the new points, they were exactly where they should have been i.e. the transformation matrix is correct.

I think the issue might be that your ScaleMat is actually the transpose of what it is supposed to be. AnyMat33 arranges the three vectors row-wise, so for example your first row entry would be {a,d,j} and so on. Try re-arranging the terms and it should give you the same answer.

Could you please share the exact numbers you are working with? i.e your matrix, test vector, expected transformed vector and actual transformed vector?

“The linear scaling is defined by a 3 by 3 scaling matrix that is multiplied to the argument (3D geometrical vector) after adding a set of offset values.”

So it is not “y=x+b*A” as you think, but "y=(x+b)A". You can construct the transform to use the Offset=b(A^-1).