# Transformation of coordinates in Mathematica

I would like to know how I can transfer the coordinate system origin in the attached object to the centroid (Red points) and then change all the points coordinates relative to the new origin. (i.e.transformation of coordinates). Using the following code I could find the centroid of the object accurately but do not know how I can transfer the coordinates to the origin? Note that the direction of X,Y and Z should remain constant in new and old coordinates. I uploaded the points of the object.

https://pastebin.com/YTw8M7Ee mesh = f[A122, 5];
mesh12 = MeshRegion[mesh, PlotTheme -> "Scientific"]
R123 = RegionCentroid[mesh12]
Show[mesh12, Graphics3D[{Red, Point[R123]}]]

• Look up geometric transformations in the documentation, such as TranslationTransform. You want the inverse such that it puts the points relative to the centroid: ivt = InverseFunction[TranslationTransform[centroid]]; tpts = ivt[pts]; Jun 18 '20 at 16:43
• Thank you! It worked. Jun 19 '20 at 2:16