RescalingTransform[{{xmin,xmax},{ymin,ymax},…},{{xpmin,xpmax},…}]
gives a TransformationFunction that rescales the region with coordinate ranges xmin to xmax, etc. to the region with coordinate ranges xpmin to xpmax, etc.
RescalingTransform[{{xmin,xmax},{ymin,ymax},…}]
gives a TransformationFunction that rescales to the unit square, cube, etc.
RescalingTransform
RescalingTransform[{{xmin,xmax},{ymin,ymax},…},{{xpmin,xpmax},…}]
gives a TransformationFunction that rescales the region with coordinate ranges xmin to xmax, etc. to the region with coordinate ranges xpmin to xpmax, etc.
RescalingTransform[{{xmin,xmax},{ymin,ymax},…}]
gives a TransformationFunction that rescales to the unit square, cube, etc.
Details
- RescalingTransform is also known as windowing transform and model view transform.
- RescalingTransform gives a TransformationFunction which can be applied to vectors.
- RescalingTransform works in any number of dimensions. In 2D, it transforms rectangles to rectangles, and in 3D cuboids to cuboids.
Examples
open all close allBasic Examples (2)
t = RescalingTransform[{{xmin, xmax}, {ymin, ymax}}]This now maps {xmax,ymax} to {1,1}:
t[{xmax, ymax}]//Simplifyt = RescalingTransform[{{xmin, xmax}, {ymin, ymax}, {zmin, zmax}}]This maps {xmax,ymax,zmax} to {1,1,1}:
t[{xmax, ymax, zmax}]//SimplifyScope (3)
Transforming the rectangle
to the rectangle
:
t = RescalingTransform[{{l1, u1}, {l2, u2}}, {{L1, U1}, {L2, U2}}]This transforms the midpoint in the source rectangle to the midpoint in the target rectangle:
t[{(l1 + u1) / 2, (l2 + u2) / 2}]//SimplifyTransformation 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}, RescalingTransform[{{0, 1}, {0, 1}}, {{1.1, 2.1}, {0, 1.5}}]]}]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}, RescalingTransform[{{0, 1}, {0, 1}, {0, 1}}, {{1.2, 2.2}, {0, 1.5}, {0, .5}}]]}, Boxed -> False]Applications (5)
Transforming graphics primitives:
Graphics3D[{{Opacity[.5], Cuboid[]}, GeometricTransformation[Cylinder[], RescalingTransform[{{-1, 1}, {-1, 1}, {-1, 1}}]]}, Boxed -> False]Compute the transform from user coordinates to Scaled coordinates in 2D:
userToScaled = RescalingTransform[{{xmin, xmax}, {ymin, ymax}}, {{0, 1}, {0, 1}}]Transform some particular coordinates:
userToScaled /@ {{xmin, ymin}, {(xmin + xmax) / 2, ymax}}//SimplifyCompute the transform from Scaled to user coordinates:
scaledToUser = RescalingTransform[{{0, 1}, {0, 1}}, {{xmin, xmax}, {ymin, ymax}}]Transform some particular coordinates:
scaledToUser /@ {{0, 1 / 3}, {1 / 2, 1}}//SimplifyCompute the transform from user coordinates to Scaled coordinates in 3D:
userToScaled = RescalingTransform[{{xmin, xmax}, {ymin, ymax}, {zmin, zmax}}, {{0, 1}, {0, 1}, {0, 1}}]Transform some particular coordinates:
userToScaled /@ {{xmin, ymin, zmin}, {(xmin + xmax) / 2, ymax, zmax}}//SimplifyCompute the transform from Scaled to user coordinates:
scaledToUser = RescalingTransform[{{0, 1}, {0, 1}, {0, 1}}, {{xmin, xmax}, {ymin, ymax}, {zmin, zmax}}]Transform some particular coordinates:
scaledToUser /@ {{0, 1 / 3, 1 / 2}, {1 / 2, 1, 1}}//SimplifyTransform from user coordinates to Scaled coordinates with a particular PlotRange:
pr = {{-1, 3}, {-1, 4}};
scaled = RescalingTransform[pr]Specify the disk in user coordinates and the circle in Scaled coordinates:
Graphics[{Cyan, Disk[{2, 2}], Thick, Red, Circle[Scaled[scaled[{2, 2}]]]}, PlotRange -> pr, Axes -> True]Compute the model view transform for OpenGL, using the
axis pointing out from the screen:
modelTransform = RescalingTransform[{{left, right}, {bottom, top}, {far, near}}, {{-1, 1}, {-1, 1}, {-1, 1}}]//SimplifyTransform user coordinates to the standard model coordinates:
modelTransform /@ {{left, bottom, far}, {right, top, near}}//SimplifyProperties & Relations (3)
The inverse of RescalingTransform[{{l1,u1},…},{{L1,U1},…}] is given by RescalingTransform[{{L1,U1},…},{{l1,u1},…}]:
t1 = RescalingTransform[{{l1, u1}, {l2, u2}}, {{L1, U1}, {L2, U2}}];
t2 = RescalingTransform[{{L1, U1}, {L2, U2}}, {{l1, u1}, {l2, u2}}];This shows that t1 and t2 are inverses:
Composition[t1, t2]//SimplifyRescaling transformation is a composition of scaling and translation:
RescalingTransform[{{a, b}}] == Composition[TranslationTransform[{-a / (b - a)}], ScalingTransform[{1 / (b - a)}]]Rescale provides a scalar version of RescalingTransform:
Rescale[x, {Subscript[l, 1], Subscript[u, 1]}, {Subscript[L, 1], Subscript[U, 1]}] == First@RescalingTransform[{{Subscript[l, 1], Subscript[u, 1]}}, {{Subscript[L, 1], Subscript[U, 1]}}][{x}]//SimplifyRelated Guides
History
Text
Wolfram Research (2007), RescalingTransform, Wolfram Language function, https://reference.wolfram.com/language/ref/RescalingTransform.html.
CMS
Wolfram Language. 2007. "RescalingTransform." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RescalingTransform.html.
APA
Wolfram Language. (2007). RescalingTransform. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RescalingTransform.html
BibTeX
@misc{reference.wolfram_2026_rescalingtransform, author="Wolfram Research", title="{RescalingTransform}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/RescalingTransform.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_rescalingtransform, organization={Wolfram Research}, title={RescalingTransform}, year={2007}, url={https://reference.wolfram.com/language/ref/RescalingTransform.html}, note=[Accessed: 13-June-2026]}