Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Computational Geometry > Geometric Transforms >
Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Transformations > Geometric Transforms >

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.
  • RescalingTransform works in any number of dimensions. In 2D, it transforms rectangles to rectangles, and in 3D cuboids to cuboids.
Rescaling the rectangle [xmin, xmax]×[ymin, ymax] to [0, 1]×[0, 1]:
This now maps {xmax, ymax} to {1, 1}:
Rescaling the cube [xmin, xmax]×[ymin, ymax]×[zmin, zmax] to [0, 1]×[0, 1]×[0, 1]:
This maps {xmax, ymax, zmax} to {1, 1, 1}:
Rescaling the rectangle [xmin, xmax]×[ymin, ymax] to [0, 1]×[0, 1]:
In[1]:=
Click for copyable input
Out[1]=
This now maps {xmax, ymax} to {1, 1}:
In[2]:=
Click for copyable input
Out[2]=
 
Rescaling the cube [xmin, xmax]×[ymin, ymax]×[zmin, zmax] to [0, 1]×[0, 1]×[0, 1]:
In[1]:=
Click for copyable input
Out[1]=
This maps {xmax, ymax, zmax} to {1, 1, 1}:
In[2]:=
Click for copyable input
Out[2]=
Transforming the rectangle [l_1,u_1]x[l_2,u_2] to the rectangle [L_1,U_1]x[L_2,U_2]:
This transforms the midpoint in the source rectangle to the midpoint in the target rectangle:
Transformation applied to a 2D shape:
Transformation applied to a 3D shape:
Transforming graphics primitives:
Compute the transform from user coordinates to Scaled coordinates in 2D:
Transform some particular coordinates:
Compute the transform from Scaled to user coordinates:
Transform some particular coordinates:
Compute the transform from user coordinates to Scaled coordinates in 3D:
Transform some particular coordinates:
Compute the transform from Scaled to user coordinates:
Transform some particular coordinates:
Transform from user coordinates to Scaled coordinates with a particular PlotRange:
Specify the disk in user coordinates and the circle in Scaled coordinates:
Compute the model view transform for OpenGL, using the z axis pointing out from the screen:
Transform user coordinates to the standard model coordinates:
The inverse of RescalingTransform[{{l1, u1}, ...}, {{L1, U1}, ...}] is given by RescalingTransform[{{L1, U1}, ...}, {{l1, u1}, ...}]:
This shows that t1 and t2 are inverses:
Rescaling transformation is a composition of scaling and translation:
Rescale provides a scalar version of RescalingTransform:
A collection of randomly rescaled cuboids:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team