# HalfSpace

HalfSpace[n,p]

represents the half-space of points such that .

HalfSpace[n,c]

represents the half-space of points such that .

# Details • HalfSpace can be used as a geometric region and a graphics primitive.
• HalfSpace corresponds to half-line or half-infinite interval in , a half-plane in , etc.
• • HalfSpace represents the set or .
• HalfSpace can be used in Graphics and Graphics3D.
• HalfSpace will be clipped by PlotRange when rendering.
• Graphics rendering is affected by directives such as FaceForm, EdgeForm, Opacity, and color.
• Graphics3D rendering is affected by directives such as Opacity and color.

# Examples

open allclose all

## Basic Examples(3)

A HalfSpace in 2D:

And in 3D:

Different styles applied to a half-space region:

Determine if points belong to a given half-space region:

## Scope(15)

### Graphics(5)

#### Specification(2)

A half-space in 2D defined by a normal vector and a point:

The same half-space defined by a normal vector and a constant:

Define a half-space in 3D using a normal vector and a point:

Define the same half-space using a normal vector and a constant:

Half-spaces varying in direction of the normal:

#### Styling(2)

Color directives specify the color of the half-space:

FaceForm and EdgeForm can be used to specify the styles of the faces and edges:

#### Coordinates(1)

Points and vectors can be Dynamic:

### Regions(10)

Embedding dimension is the dimension of the coordinates:

Geometric dimension is the dimension of the region itself:

Point membership test:

Get the conditions for membership:

A half-space has infinite measure and undefined centroid:

Distance from a point:

Signed distance from a point:

Nearest point in the region:

Nearest points:

A half-space is unbounded:

Find the region range:

In the axis-aligned case:

Integrate over a half-space:

Optimize over a half-space:

Solve equations over a half-space:

## Applications(5)

Visualize 2D half-planes:

The upper half-plane:

The lower half-plane:

The left half-plane:

The right half-plane:

Visualize 3D half-spaces:

The upper half-space:

The lower half-space:

The left half-space:

The right half-space:

The front half-space:

The back half-space:

Partition space in a BubbleChart:

Combine the graphics:

Any convex polygon in 2D can be represented as an intersection of half-spaces:

Any convex polyhedron in 3D can be represented as an intersection of half-spaces:

## Properties & Relations(7)

ClipPlanes, for a given , results in a graphic that does not render anything within the :

HalfSpace is a special case of ConicHullRegion:

HalfSpace is a special case of AffineHalfSpace:

HalfLine is a special case of HalfSpace:

HalfPlane is a special case of HalfSpace:

ImplicitRegion can represent any HalfSpace in :

In :

In :

ParametricRegion can represent any HalfSpace in :

In :

In :

## Neat Examples(1)

A collection of random half-spaces in :

In :