gives a TransformationFunction that represents translation of points by a vector v.
TranslationTransform
gives a TransformationFunction that represents translation of points by a vector v.
Details
- TranslationTransform gives a TransformationFunction that can be applied to vectors.
- TranslationTransform[{x1,…,xn}] gives a transformation for vectors with dimension n.
- TranslationTransform[v][r] for vectors v and r is equivalent to r+v.
Examples
open all close allBasic Examples (1)
Scope (3)
Translation in four dimensions:
t = TranslationTransform[{x0, y0, z0, w0}]t[{x, y, z, w}]InverseFunction[t]InverseFunction[t][{x, y, z, w}]Apply the transform five times:
Nest[t, {x, y, z, w}, 5]Use matrix operations and homogeneous coordinates:
MatrixPower[TransformationMatrix[t], n].{x, y, z, w, 1}Transformation applied to a 2D shape:
gr = {Rectangle[], AbsolutePointSize[10], Opacity[1], {Magenta, Point[{0, 0}]}, {Green, Point[{1, 1}]}};Graphics[{{Opacity[.35], Blue, gr}, GeometricTransformation[{Opacity[.85], Red, gr}, TranslationTransform[{.75, -.25}]]}]Transformation applied to a 3D shape:
gr = {Cuboid[], AbsolutePointSize[10], Opacity[1], {Magenta, Point[{0, 0, 0}]}, {Green, Point[{1, 1, 1}]}};Graphics3D[{{Opacity[.35], Blue, gr}, GeometricTransformation[{Opacity[.85], Red, gr}, TranslationTransform[{.75, -.25, -.5}]]}, Boxed -> False]Applications (2)
Transforming graphics primitives:
Graphics[GeometricTransformation[Circle[], TranslationTransform[{1, 1}]], Axes -> True]Graphics3D[FoldList[Normal@GeometricTransformation[#, TranslationTransform[#2]]&, Cuboid[], RandomChoice[Permutations[{1, 0, 0}], 50]], Boxed -> False]Properties & Relations (4)
The translation transformation is an isometric transform, i.e. preserves distances:
t = TranslationTransform[{1, 2}];{p1, p2} = {{10, 17}, {1, 2}};
{tp1, tp2} = t[{p1, p2}];EuclideanDistance[p1, p2] == EuclideanDistance[tp1, tp2]Translating by
and then by
is the same as translating by
:
Composition[TranslationTransform[{px, py}], TranslationTransform[{qx, qy}]]The inverse of translating by
is the same as translating by
:
InverseFunction[TranslationTransform[{px, py}]]For geometric transformations, use Translate directly:
{Graphics[Translate[Circle[], {1, 1}], Frame -> True], Graphics[GeometricTransformation[Circle[], TranslationTransform[{1, 1}]], Frame -> True]}{Graphics3D[Translate[Sphere[], {1, 1, 1}], Axes -> True], Graphics3D[GeometricTransformation[Sphere[], TranslationTransform[{1, 1, 1}]], Axes -> True]}Neat Examples (1)
Scale a 3D object about a point
:
cow = ExampleData[{"Geometry3D", "Cow"}, "GraphicsComplex"];p = {0, 0, -0.251619};Graphics3D[{EdgeForm[None], Opacity[0.5], Table[{Lighter[ColorData[1, k], 0.5], GeometricTransformation[cow, TranslationTransform[k / 2{1, 0, 0}]]}, {k, 1, 3}]}, Lighting -> "Neutral", ImageSize -> Large, Boxed -> False]Graphics3D[{EdgeForm[None], Opacity[0.5], Table[{Lighter[ColorData[1, k], 0.5], GeometricTransformation[cow, TranslationTransform[k / 2{0, 1, 0}]]}, {k, 1, 3}]}, Lighting -> "Neutral", ImageSize -> Large, Boxed -> False]Graphics3D[{EdgeForm[None], Opacity[0.5], Table[{Lighter[ColorData[1, k], 0.5], GeometricTransformation[cow, TranslationTransform[k / 2{0, 0, 1}]]}, {k, 1, 3}]}, Lighting -> "Neutral", ImageSize -> Large, Boxed -> False]Related Guides
History
Text
Wolfram Research (2007), TranslationTransform, Wolfram Language function, https://reference.wolfram.com/language/ref/TranslationTransform.html.
CMS
Wolfram Language. 2007. "TranslationTransform." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TranslationTransform.html.
APA
Wolfram Language. (2007). TranslationTransform. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TranslationTransform.html
BibTeX
@misc{reference.wolfram_2026_translationtransform, author="Wolfram Research", title="{TranslationTransform}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/TranslationTransform.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_translationtransform, organization={Wolfram Research}, title={TranslationTransform}, year={2007}, url={https://reference.wolfram.com/language/ref/TranslationTransform.html}, note=[Accessed: 13-June-2026]}