CoordinateBoundingBox

CoordinateBoundingBox[coords]

gives the corners {{xmin,ymin,},{xmax,ymax,}} of the bounding box of the region defined by coords.

CoordinateBoundingBox[coords,δ]

pads the region by δ in each direction.

CoordinateBoundingBox[coords,Scaled[s]]

pads by the scaled amount s in each direction.

CoordinateBoundingBox[coords,{p1,p2,}]

pads by p1, p2, in successive dimensions.

CoordinateBoundingBox[coords,{{p1min,p1max},{p2min,p2max},}]

gives {{xmin-p1min,ymin-p2min,},{xmax+p1max,ymax+p2max,},}

Details

Examples

open allclose all

Basic Examples  (1)

Find a bounding box for coordinates in 2 dimensions:

Pad by 1 in each direction:

Pad by 1/4 of the span in each dimension:

Scope  (1)

Coordinates in 3D of different types at various levels in a list:

Find the bounding box:

Pad by 1 in each dimension:

Pad by a fraction of the difference in each dimension:

Pad by different amounts for different dimensions:

Pad the minima and maxima differently:

Generalizations & Extensions  (1)

When there are coordinates that are not numerical, the result is typically expressed in terms of Min and Max:

Properties & Relations  (2)

Generally, CoordinateBoundingBox[coords] is the transpose of CoordinateBounds[coords]:

For coordinates given in a matrix, CoordinateBoundingBox[coords] is equivalent to Transpose[Map[MinMax,Transpose[coords]]]:

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

Text

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

CMS

Wolfram Language. 2015. "CoordinateBoundingBox." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CoordinateBoundingBox.html.

APA

Wolfram Language. (2015). CoordinateBoundingBox. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CoordinateBoundingBox.html

BibTeX

@misc{reference.wolfram_2024_coordinateboundingbox, author="Wolfram Research", title="{CoordinateBoundingBox}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/CoordinateBoundingBox.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_coordinateboundingbox, organization={Wolfram Research}, title={CoordinateBoundingBox}, year={2015}, url={https://reference.wolfram.com/language/ref/CoordinateBoundingBox.html}, note=[Accessed: 21-December-2024 ]}