# Draw a concave polygon in VectorPaint: audit signed shoelace order and the closing edge

Language: en
Canonical: [Draw a concave polygon in VectorPaint: audit signed shoelace order and the closing edge](<https://allluckly.cn/en/guides/vectorpaint-concave-polygon-shoelace-signed-order-closing-edge/>)
中文：[中文 HTML](<https://allluckly.cn/guides/vectorpaint-concave-polygon-shoelace-signed-order-closing-edge/>)
English: [English HTML](<https://allluckly.cn/en/guides/vectorpaint-concave-polygon-shoelace-signed-order-closing-edge/>)
Published: 2026-11-16T00:00:00+08:00
Modified: 2026-11-16T10:29:38+08:00
Author: Bison

Use five original vertices to check area 18, then reverse and translate them and contrast a self-crossing path.

English translation of the [Chinese original](<https://allluckly.cn/guides/vectorpaint-concave-polygon-shoelace-signed-order-closing-edge/>), translated on 2026-11-16. Original publication dates, attribution, code and version notes are retained.

Concavity permits an edge-by-edge area calculation, but vertex order matters. Draw a concave pentagon, audit its area, then reverse and translate its ordered vertices to check sign and closure before considering a self-crossing control.

## Fix five vertices in boundary order

Walk A=(0,0), B=(6,0), C=(6,4), D=(3,2), E=(0,4), then close to A. D forms the upper notch and the five edges do not cross. Keep boundary order rather than sorting vertices by x, which changes the polygon. On a roughly 1600 by 1400 canvas, 140 pixels per unit and screen origin (150,950) give width 840 and height 560 pixels. Reverse vertical direction for screen placement and retain equal scales to keep the paper geometry readable.

## Include the final-to-first pair in both product sums

Sum each x times the next y, then each y times the next x, including E back to A. The sums are 48 and 12, whose difference divided by 2 is signed area 18; ordinary area takes the absolute value. Repeating the first point in a ledger marks closure rather than a sixth vertex. This origin-based sample has a zero final contribution, so accidentally omitting it can pass. The translated control later deliberately tests closure instead of treating one correct answer as proof of a complete procedure.

```text
A=(0,0); B=(6,0); C=(6,4); D=(3,2); E=(0,4)
order=A,B,C,D,E,A
sum(x_i*y_next)=48; sum(y_i*x_next)=12
signed_area=(48-12)/2=18
reverse_signed_area=-18
translated=(10,7),(16,7),(16,11),(13,9),(10,11)
translated_sums=603,567; closing_cross_term=-40
translated_without_closing=(36+40)/2=38
bow_tie=(0,0),(4,4),(0,4),(4,0); signed_area=0
```

## Draw the closed notch without replacing order by fill

Use available path tools to join the five vertices and explicitly close the path. Keep C-D and D-E as notch edges instead of adding C-E and filling the missing triangle. Inspect five outline edges before applying a light fill and vertex marks. A filled appearance does not prove vertex order or calculate area. Thick joins can hide the concave point, so inspect it separately. Group diagram and notes so moving an annotation does not raise D to the top edge and change the shape into a rectangle of area 24.

## Independently check eighteen by removing the notch

The bounding rectangle has width 6, height 4 and area 24. Remove a triangle with base 6 and height 2, area 6, leaving 18. This independent decomposition checks the shoelace result rather than using the entire bounding box. Measure notch height from top y=4 down to D at y=2, not from D to the baseline merely because both happen to be 2 here. A separate pale control can illustrate the subtraction. A difference of 6 suggests the notch was not removed; sign alone instead points to orientation.

## Reverse boundary traversal to change signed orientation

Reverse to A-E-D-C-B-A without moving any point. The two sums exchange to 12 and 48, producing signed area -18 but ordinary area 18. No reflection or coordinate change is needed; only traversal reverses. Screen y increases downward, so visual orientation differs from mathematical y-up orientation. State the coordinate convention. A changed absolute area suggests an omitted vertex or changed adjacency. Do not take each edge contribution’s absolute value before summing, which destroys the required signed cancellation.

## Use a translated control to expose a missing closing edge

Translate every point by (10,7), retaining boundary order. The ledger gives the new coordinate pairs. Product sums become 603 and 567, still differing by 36. Translation preserves lengths/area, but the final closing contribution is now -40 rather than zero. Omitting it incorrectly gives area 38. This control tests complete pairing; large intermediate sums do not mean larger geometric area. Retain both ledgers. Use separate panels if needed rather than compressing only one axis to fit both drawings.

## Do not treat a self-crossing signed sum as ordinary union area

Use a separate bow-tie control through (0,0),(4,4),(0,4),(4,0). Its signed sum gives zero even though two visible triangles each have area 4. Directional cancellation does not mean an empty region. Apply this ordinary-area calculation to a simple non-self-crossing polygon; the absolute value of the bow-tie sum does not recover union area 8. Check crossings and define the intended region rather than infer meaning from fill appearance. Keep this control separate without inventing automatic polygon repair or union measurement.

## Reopen with edge order and both controls

Save the editable original and reopen an export, checking five labels, notch and closure. Retain area 18, reversed signed -18 and translated area 18. First trace the closed boundary, then recompute both sums and verify rectangle-minus-triangle agreement. The bow-tie is only a condition warning. Enlarge annotations if signs/pairs are unreadable rather than omit the closing term. Separate pixel area from mathematical square units; export dimensions do not measure the polygon. This is an original path diagram with external calculations, not an in-app area engine or device measurement test.

## Related guides and sources

[Quadrilateral midpoint diagram](<https://allluckly.cn/en/guides/vectorpaint-quadrilateral-midpoints-parallelogram-half-area/>), [L-shaped area centroid](<https://allluckly.cn/en/guides/vectorpaint-l-shaped-area-centroid-outside-material/>).

Method sources: [Ross Pure and Salman Durrani The Mathematica Journal §2 Theorem1](<https://content.wolfram.com/sites/19/2015/06/Durrani.pdf>).

Checked on November 16, 2026: the [official VectorPaint listing](<https://apps.apple.com/cn/app/id1587272880>) and [Apple public lookup](<https://itunes.apple.com/lookup?id=1587272880&country=cn&entity=software&timestamp=20261116>) list public version 1.0.8, requiring iOS / iPadOS 17.0 or later. Work within published shapes, pen/node editing, layers, grouping, text and export capabilities. Prepare coordinates and calculations externally and identify installed controls; no built-in geometry solver or equation plotter is assumed. No completed physical-device test is claimed.

