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:
  • Automaticautomatically determined side length
    Allthe original side length
    Scaled[s]fraction s of the original side length
    numnum 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 all

Basic Examples  (2)

Resize a triangle:

Visualize the regions:

Resize a 3D mesh region:

Visualize the regions:

Scope  (24)

Basic Uses  (7)

RegionResize works for any constant region:

Non-constant regions:

Finite regions:

Visualize the regions:

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:

Original side length:

A fraction of the original side length:

Number:

Upper bounds:

Special Regions  (6)

Regions in :

Regions in :

Visualize the regions in :

Regions in :

Visualize the regions in :

Regions in :

Formula Regions  (3)

A union of two disks as an ImplicitRegion:

Visualize the regions:

A union of two cylinders as an ImplicitRegion:

Visualize regions:

A rational parametrization of a disk represented as a ParametricRegion:

Visualize regions:

Mesh Regions  (4)

MeshRegion in 2D:

Visualize regions:

MeshRegion in 3D:

Visualize regions:

BoundaryMeshRegion in 2D:

Visualize bounds:

BoundaryMeshRegion in 3D:

Visualize regions:

Derived Regions  (4)

RegionIntersection of two regions:

Visualize regions:

RegionUnion of mixed-dimensional regions:

Visualize bounds:

TransformedRegion:

Visualize bounds:

RegionBoundary:

Visualize bounds:

Applications  (4)

Resize a rectangle:

Triangle:

Cuboid:

Pyramid:

Resize a 3D model before printing:

A smaller model:

Reduce the cost of the 3D printed model:

Resize a graphics scene:

Modify a plot:

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:

Possible Issues  (1)

An infinite region cannot be resized to fit in a finite box:

Wolfram Research (2016), RegionResize, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionResize.html.

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

BibTeX

@misc{reference.wolfram_2024_regionresize, author="Wolfram Research", title="{RegionResize}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/RegionResize.html}", note=[Accessed: 25-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_regionresize, organization={Wolfram Research}, title={RegionResize}, year={2016}, url={https://reference.wolfram.com/language/ref/RegionResize.html}, note=[Accessed: 25-November-2024 ]}