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.


enter image description here

mesh = f[A122, 5];
mesh12 = MeshRegion[mesh, PlotTheme -> "Scientific"]
R123 = RegionCentroid[mesh12]
Show[mesh12, Graphics3D[{Red, Point[R123]}]]
  • 2
    $\begingroup$ 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]; $\endgroup$
    – flinty
    Jun 18 '20 at 16:43
  • $\begingroup$ Thank you! It worked. $\endgroup$ Jun 19 '20 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.