ConvexRegionQ

ConvexRegionQ[reg]

gives True if reg is a convex region and False otherwise.

Details

  • A region is convex if no line segment between two points in the region ever goes outside the region.
  • A region is convex if for points p1,p2reg, λ p1+(1-λ)p2reg for all 0λ1.

Examples

open allclose all

Basic Examples  (2)

Test whether a rectangle is convex:

A circle is not a convex region:

Scope  (20)

Special Regions  (4)

Regions in including Point:

Interval:

A HalfLine is unbounded:

Regions in including Point:

Line:

Polygon:

Circle:

Disk:

Regions in including Point:

Line:

Polygon:

Cylinder:

Regions in including Simplex in :

Cuboid in :

Ball in :

Mesh Regions  (4)

MeshRegion in 1D:

2D:

3D:

MeshRegion that represents a curve in 2D:

A MeshRegion can have components of different dimensions:

BoundaryMeshRegion in 1D:

2D:

3D:

Formula Regions  (3)

A parabolic region as an ImplicitRegion:

A parabola represented as a ParametricRegion:

ImplicitRegion can have several components of different dimensions:

Derived Regions  (6)

RegionIntersection of two regions:

RegionUnion of mixed-dimensional regions:

General BooleanRegion combination:

TransformedRegion:

InverseTransformedRegion:

RegionBoundary:

Geographic Regions  (3)

Test a polygon with GeoPosition:

Polygons with GeoPositionXYZ:

Polygons with GeoPositionENU:

The area of a polygon with GeoGridPosition:

ConvexRegionQ works on polygons with geographic entities:

Applications  (5)

Platonic solids are convex:

Test whether a basic region is convex:

The convex hull of a compound of five tetrahedra is a dodecahedron:

Test whether a polygon is concave:

Generate random polygons for testing algorithms and verification of time complexity:

Time complexity for algorithms for convex polygons:

Properties & Relations  (3)

If two regions are convex, the intersection is convex:

The InverseTransformedRegion of a convex region is convex:

Using ConvexHullRegion to create a convex region:

Possible Issues  (1)

ConvexRegionQ returns False for nonconstant regions:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_convexregionq, organization={Wolfram Research}, title={ConvexRegionQ}, year={2020}, url={https://reference.wolfram.com/language/ref/ConvexRegionQ.html}, note=[Accessed: 18-November-2024 ]}