# Get coordinates of points after Translate[]

Suppose I have some small set of points Pts in 3D space:

Pts = Point[#] & /@ {{RandomReal[], RandomReal[],
RandomReal[]}, {RandomReal[], RandomReal[], RandomReal[]}};


Then, I apply Translate[] to make more points, for instance:

translatedPoints = Graphics3D@Translate[Pts, Tuples[Range[4], 3]]


The question is, how do I get the coordinates of the new set of points from the translatedPoints object? (as a list of points {{$$x1, y1, z1$$},..,{$$xn, yn, zn$$}})

Thanks!

• use Point[Join @@ (TranslationTransform[#][First /@ Pts] & /@ Tuples[Range[4], 3])] instead of Translate[Pts, Tuples[Range[4], 3]?
– kglr
May 3, 2020 at 4:53

1. With a slightly different way to use Translate we can use Normal on translated points:

translatedPoints2 = Graphics3D[Translate[Pts, #] & /@ Tuples[Range[4], 3]];

translatedPoints2[[1]] // Short[#, 10] &


tpts = Join @@ Normal[translatedPoints2[[1]]];

tpts[[All, 1]] // Short[#, 15] &


2. Alternatively, you can post-process your translatedPoints before using Normal to get the same result:

tpts == Join @@ Normal[translatedPoints[[1]] /.
Translate[a_, tr_] :> (Translate[a, #] & /@ tr) ]

 True


3. Post-process your translatedPoints using TranslationTransform:

tpts[[All, 1]] ==
Join @@ (translatedPoints[[1]] /.
Translate[a_, tr_] :> (TranslationTransform[#][First /@ a] & /@ tr))

 True