A rooted tree whose leaves describe primitive regions and whose internal nodes describe Boolean operations. A half-space leaf can hold an implicit equation and an inside-sign convention. Evaluate membership from the leaves toward the root; interval arithmetic can propagate conservative inside/outside bounds over a box instead of a single point.
Implicit equation Created 2026-10-18 Updated 2026-10-24
An implicit equation specifies a relation between variables without isolating a designated output as an explicit function of the inputs. For example, specifies a circle. On , it determines the two real branches , each an implicit function when one branch is selected. The implicit function theorem gives local conditions for a unique differentiable branch; implicit differentiation computes its derivative without first solving explicitly.
Midpoint line decision 2026-10-31
For the implicit equation , the sign of compares the exact line with the midpoint between candidate pixel centres and . Multiplication by two makes the test integral. A consistent equality rule specifies which tied pixel is selected.
By exchanging axes, reversing endpoint order and reflecting coordinate signs where necessary, reduce a general line segment to the first octant:
The vertical case is handled by exchanging axes. In this octant, increasing by one requires increasing by either zero or one. Thus, from the currently plotted pixel the candidates are and .
Use the implicit equation of the line
At a fixed , means that lies below the exact line. The midpoint line decision evaluates , halfway between the two candidate pixel centres. If , the exact line lies below , so choose ; if , choose . At equality either candidate is equally near, but a fixed tie rule is essential. We choose on a tie throughout these solutions:
This chooses the closest vertical-grid pixel centre in each column, with ties rounded upward. Since , the result has one pixel per column and consecutive pixels share an edge or a corner.
Set and . A displacement from lies along the straight line precisely when its two-dimensional determinant with vanishes. Thus an implicit equation is
Equivalently, write , with , and . The vector is a normal vector. The formula handles vertical and horizontal straight lines without division. It presupposes : coincident points do not determine a unique straight line.
Solving the implicit equation for when gives
Here “gradient” means the slope , rather than the gradient of an implicit defining function. If and , the straight line is vertical and has no finite slope. If and , its slope is zero.
Put and define six closed half-spaces . Their implicit equations and outward normal vectors are:
BoundaryDefining function Outward normal
The six vertices of a polygon traverse the boundary counterclockwise. Each displayed normal vector therefore points to the right of the corresponding directed boundary line segment; it need not be a unit vector. The zero level sets are full straight lines, while the actual boundary retains only the appropriate line segments.
The inward corner at prevents using the set intersection of all six half-spaces: that would incorrectly discard the upper-left part of the seat. Instead take
The last factor permits either or , removing only the upper-right region. Another way to understand the same constructive solid geometry model is as the set union of two convex polygons, obtained by distributing the last set intersection over this set union. Its constructive solid geometry tree has an intersection at the root and a union child for .
Figure 1.
Seat profile, six supporting lines with outward normals, and the right child of the initial bounding box
. Details.
The tight axis-aligned bounding box is . Bisect vertically at , giving a right child . For a scalar implicit function representing the same constructive solid geometry solid, use
With the convention inside, set intersection corresponds to the maximum, and set union to the minimum. These operations encode membership; is not a signed distance function.
Since every is an affine function, its extreme values on occur at corners. Exact real-arithmetic interval arithmetic gives:
FunctionRange on , propagated, propagated
Each leaf range is exact, but combining independent intervals forgets that the expressions share . The final enclosure need not be the exact range of . For example, equality would require both , hence , and , hence on , which is impossible. The enclosure is still sufficient for a reliable three-way decision:
Here the result is unresolved. This is a real mixed box, rather than only a pessimistic test: is strictly inside, whereas is outside. A zero endpoint alone can also mean contact with the boundary, so equality must not be treated as proof of strict interior or strict exterior. In floating-point arithmetic, certified bounds require outward rounding.
Continue splitting unresolved boxes, normally alternating axes or splitting the longest side. Propagate the interval arithmetic results through the constructive solid geometry tree, discard exterior boxes and stop refining strict interior boxes. In sufficiently small boundary boxes, locate crossings of the active implicit equations with box edges and connect them into boundary line segments. Retain corners and resolve ambiguous multiple crossings by further refinement; here every genuine boundary piece is straight, so its supporting implicit equation allows exact intersection rather than a curved approximation. A maximum boundary-box diagonal gives spatial localization at that scale, provided no boundary components are discarded; corner-sign sampling alone provides no such guarantee.
The tight box saves empty-space work, but it is awkward for extracting facets. Entire boundary line segments, notably , and , lie on the initial box boundary, and lies on the first splitting straight line. A sign-change-only method may have no exterior sample on the other side and lose such pieces; exact zeros also persist through refinement. A slightly padded initial axis-aligned bounding box, together with an explicit rule for boundary-coincident pieces, makes the faceting more robust. The tight box is therefore economical for enclosure but not the best unqualified choice for a simple faceting implementation.
Put . By part (i), . The acute-angle geometry requires . Expressing the tangents in terms of their sines in the geometric constraint gives the required implicit equation
The hint suggests for an integer . Testing gives
Thus . Each term on the left is strictly increasing in over the allowed interval, so this solution is unique.