How this calculation works
Find the narrowest parallel strip containing a convex polygon. The calculator tests the support width perpendicular to every edge and returns a minimizing normal, supporting-line offsets and touching vertices. The output describes thickness rather than area, diameter or an axis-aligned bounding box, and explicitly identifies degenerate collinear input.
width=min over polygon edges e of [max_i(n_e·v_i)−min_i(n_e·v_i)], with unit edge normal n_e.A worked example
Rectangle(0,0),(4,0),(4,2),(0,2) has edge-normal widths2 and4. Minimum2 occurs between y=0 andy=2, with normal(0,1), angle90degrees and both bottom/top touching vertex pairs.
Good to know
3–200 distinct boundary-ordered convex vertices within±1e6. Test all edge-normal support widths using translated coordinates. Numerical tolerance tied to extent, not global coordinate offset. Collinear input explicitly returns degenerate width0; concavity, crossing order and repeated vertices rejected. Angle is normal orientation, not line direction. Ties include opposite normals and may describe the same physical strip.
Reference: Method reference (opens in a new tab) ↗
What the two supporting lines mean
A supporting line touches the polygon while leaving the whole polygon on one side. A pair of parallel supporting lines encloses a strip, and their perpendicular separation is the polygon's width in that orientation.
The minimum width is the narrowest such strip over all orientations. It does not measure the longest vertex-to-vertex distance, and a polygon can have the same area as another polygon while being much thinner in its minimizing direction.
Compare this with the Convex hull calculator from unordered points. Hull construction and diameter do not minimize separation of parallel supporting lines.
Why edge normals are enough
For a convex polygon, a minimum-width strip can be chosen with one supporting line containing an edge. The opposite line touches at least one vertex, possibly an entire parallel edge. This reduces a continuous orientation problem to finitely many candidates.
For each edge, the calculator forms a unit perpendicular normal and projects all vertices onto it. The largest projection minus the smallest gives that orientation's strip width; examining every edge supplies the full candidate set rather than a sampled-angle approximation.
Preparing a convex boundary in order
Enter distinct polygon vertices in clockwise or counterclockwise boundary order. The first vertex is not repeated at the end, because closure is implicit. The implementation checks that all vertices lie on the proper side of every boundary edge.
Concave boundaries and crossing vertex orders are rejected rather than silently replaced by their convex hull. This keeps the requested shape explicit; if the input is an unordered point cloud, construct and inspect its hull before using the polygon-width model.
Checking the four-by-two rectangle
The default rectangle has corners (0,0), (4,0), (4,2) and (0,2). A vertical normal gives projection extrema zero and two, corresponding to horizontal supporting lines y=0 and y=2, so the width is two.
The other independent edge direction gives width four. Testing all four edges therefore returns minimum two, with opposite vertical normals describing the same physical strip. The touching-vertex groups identify both complete horizontal edges rather than one arbitrarily selected corner.
Reading normals, angles and offsets
The normal is perpendicular to the supporting lines. Its angle is measured from the positive x axis, so a ninety-degree normal corresponds to horizontal lines; interpreting it as the line's own direction would rotate the reported strip by a right angle.
If the unit normal is n and the offsets are l and h, the support lines are n dot x equals l and n dot x equals h. Their separation is h minus l. Negating the normal changes the offsets but represents the same enclosing strip.
Understanding ties and zero width
Several edges can produce the same minimum, especially when opposite sides are parallel or the polygon has rotational symmetry. The returned candidate ties can include opposite normals for one geometric strip, so their count is not a count of distinct strip orientations.
A resolved collinear input is reported with width zero and a degenerate flag. It represents a segment-like set rather than a positive-area polygon; the result should not be used as evidence that a manufacturing part has a valid two-dimensional interior.
Keeping numerical scale and units consistent
Coordinates are translated internally before area and support calculations, reducing cancellation for a small polygon far from the origin. Tolerances depend on the polygon's extent, and reported supporting offsets are converted back to the original coordinate system.
Use three through two hundred vertices with coordinates within one million in magnitude and a shared Cartesian length unit. Near-collinear decisions remain numerical. Latitude and longitude, anisotropic map scaling or mixed measurement units must be converted before the width can be interpreted as a physical distance.
A few questions, answered
Is the output angle the direction of the lines?
No. It is the direction of their perpendicular unit normal.
Can clockwise vertices be used?
Yes. Either boundary orientation is accepted if the polygon is convex and correctly ordered.
Why are two opposite normals listed as ties?
They describe the same pair of parallel supporting lines with reversed signs.
Does a collinear input have a width?
Its minimum strip separation is zero, and the calculator explicitly marks it degenerate.