RegionResize
RegionResize[reg,l]
resize the region reg to have the first side length l preserving side length ratios.
RegionResize[reg,{lmax}]
resize into a box with maximum side length lmax preserving side length ratios.
RegionResize[reg,{l1,l2,…}]
resize into a box with side lengths li.
RegionResize[reg,{{x1,min,x1,max},{x2,min,x2,max},…}]
resize into a box with corners {x1,min,x2,min,…} and {x1,max,x2,max,…}.
Details
- RegionResize is used to resize a region in ways that either preserve the shape or distort the shape.
- The side lengths li can be any of:
-
Automatic automatically determined side length All the original side length Scaled[s] fraction s of the original side length num num side length {num} at most num side length - RegionResize[reg,l] is equivalent to RegionResize[reg,{l,Automatic,…}].
- RegionResize[reg,{l}] is equivalent to RegionResize[reg,{{l},{l},…}].
Examples
open allclose allBasic Examples (2)
Scope (24)
Basic Uses (7)
RegionResize works for any constant region:
RegionResize works on any geometric dimension:
Resize the region to have the first side length 2 and preserve side length ratios:
Resize into a box with maximum side length 3 and preserve side length ratios:
Resize into a box with side lengths:
Resize into a box with corners:
The side lengths li can be automatically determined:
Special Regions (6)
Formula Regions (3)
A union of two disks as an ImplicitRegion:
A union of two cylinders as an ImplicitRegion:
A rational parametrization of a disk represented as a ParametricRegion:
Mesh Regions (4)
Derived Regions (4)
RegionIntersection of two regions:
RegionUnion of mixed-dimensional regions:
Applications (4)
Properties & Relations (3)
RegionResize can preserve the box ratios by resizing the region to have the first side length:
Use RegionBounds to get bounds of a region:
Rescale the region and get the new bounds:
RescalingTransform can be used to resize the region:
Use RescalingTransform:
Text
Wolfram Research (2016), RegionResize, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionResize.html.
CMS
Wolfram Language. 2016. "RegionResize." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionResize.html.
APA
Wolfram Language. (2016). RegionResize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionResize.html