How this calculation works
Construct the polar dual of a convex spatial hull whose interior contains the origin, with primal-facet to dual-vertex correspondences.
P°={y:x·y≤1 for every x∈P}; a facet n·x=h maps to n/h.A worked example
The default tetrahedron with alternating-sign unit coordinates has a dual tetrahedron of volume8/3.
Good to know
4–30 finite spatial points spanning a bounded3D hull; origin strictly inside every supporting halfspace. Numerical hull predicates with strict interior margin; no unbounded or lower-dimensional polar output.
Reference: Fukuda: polyhedral computation and duality (opens in a new tab) ↗
Reciprocal geometry around an origin
The polar of a convex body is defined through an inequality rather than by merely swapping labels in a drawing. A candidate dual point y belongs to the polar when its dot product with every primal point x is at most one. The origin is part of that definition.
For a bounded full-dimensional polar, the primal body must contain the origin strictly inside. Translating a body can therefore change its polar substantially, even when the untranslated body's volume and edge lengths remain unchanged. This makes the coordinate origin a geometric choice, not an incidental display setting.
Compare this with the Convex polyhedron calculator from half space inequalities. Construct the polar dual and primal-dual face correspondences, not merely the solid defined by a half-space list.
From point samples to supporting facets
The input is a finite set of spatial coordinates. Interior observations are permitted: the calculator first constructs their convex hull and identifies its supporting facets. Points that do not change the hull cannot impose an additional effective inequality on the polar.
A supporting facet is written as a unit outward normal n dotted with x equals a positive offset h. Dividing its normal by h produces one dual vertex. Facets with the same plane are grouped before this mapping, so triangulating a flat primal face does not create several artificial dual vertices.
A tetrahedron that can be checked by hand
The default vertices are one-one-one, one-minus-one-minus-one, minus-one-one-minus-one and minus-one-minus-one-one. They surround the origin symmetrically. Their supporting planes map to the opposite alternating-sign coordinate pattern, producing another tetrahedron with four vertices and four facets.
Each tetrahedron has volume eight-thirds in these coordinate units. The equality of those two volumes is special to this example and normalization; it is not a general polar-duality identity. The important checks are the reciprocal face incidences and all primal-dual dot-product inequalities.
Building and checking the dual hull
After producing one reciprocal vertex per primal facet, the calculator constructs their convex hull. Its facets represent primal extreme vertices. In three dimensions, polarity reverses face inclusion: a primal vertex corresponds to a dual facet, a primal facet to a dual vertex, and edges to edges.
Every primal input point is tested against every generated dual vertex. The maximum value of dot product minus one reports the worst numerical inequality violation. A positive violation larger than the accepted margin means the constructed object cannot be trusted as the stated polar and is rejected.
Understanding distances and scaling
A supporting plane closer to the origin produces a reciprocal vertex farther away, because its offset appears in a denominator. A body that nearly touches the origin can therefore have an enormous polar spike. This is a geometric sensitivity, not necessarily a programming error.
Uniformly scaling the primal coordinates by a positive factor scales the polar by its reciprocal. Consequently primal and dual volumes scale in opposite cubic directions. Rotation about the origin rotates the polar by the same orthogonal transformation, while arbitrary translation has no corresponding simple reciprocal rule.
Boundary cases that are intentionally excluded
If the origin lies on a primal face or outside the body, its polar may be unbounded or have a different structure from the bounded solid handled here. The calculator rejects these cases instead of fabricating a closed polyhedron from only the reciprocal points it can obtain.
Nearly coplanar samples and very small facet offsets are also poorly conditioned under floating arithmetic. Rescale the data and choose a well-separated origin when possible. The inequality residual is a useful diagnostic, but it is not a proof that arbitrary uncertain coordinates satisfy exact convex predicates.
Using correspondences rather than only volume
The correspondence table is often more useful than a single headline volume. It identifies which primal supporting face generated each dual vertex and makes it possible to study how face incidence reverses. Comparing only vertex counts would miss that structural information.
For a checkable example, compute the polar of a centered cube: its dual should be an octahedron. Computing the polar again should recover the original convex body within numerical tolerance. These reciprocal tests should always use the same origin and the same inequality normalization.
A few questions, answered
Why must the origin be inside?
Strict interior containment gives a bounded full-dimensional polar under the stated inequality convention.
Can I translate the shape first?
Yes, but translation changes the polar because its definition depends on the origin.
Are coplanar face triangles separate dual vertices?
No. One supporting plane produces one reciprocal vertex, regardless of how its face could be triangulated.
Does the dual have the same volume?
Generally no. The equality in the default tetrahedron is a special normalized example.