# 좌표로 다각형 넓이 계산: 신발끈 공식

> 꼭짓점 좌표로 단순 다각형의 넓이, 둘레, 도심을 신발끈 공식으로 구하고 각 항의 계산 과정을 확인하세요.

직접 계산할 수 있는 페이지: https://www.calcopenly.com/ko/geometry/polygon-area-from-coordinates
분야: 기하 계산기

List a polygon's corners in order around the outline and the shoelace formula gives its area: A = ½|Σ(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)|, with the sum wrapping from the last vertex back to the first. The sign of the sum shows the direction of travel, positive for counterclockwise. The same terms give the centroid, and the edge lengths add up to the perimeter.

The default five points, (1, 6), (3, 1), (7, 2), (4, 4) and (8, 5), are the worked example in Wikipedia's article on the formula: the terms sum to 33, so the area is 16.5 m². Surveyors use the method, also called the surveyor's area formula, to find a plot's area from the corner coordinates on a site plan.

The outline must not cross itself; crossing edges trigger a warning, because the overlapping parts then cancel or count twice. Coordinates must be planar, so convert latitude and longitude to a projected grid such as UTM first.

## 입력

- **Vertices in order (x, y per line)**: Go around the outline in either direction. Brackets and semicolons are fine; a repeated first point at the end is ignored.
- **Coordinates are in** (선택 항목: No unit, 밀리미터 (mm), 센티미터 (cm), 미터 (m), 킬로미터 (km), 인치 (in), 피트 (ft), 야드 (yd), 마일 (mi))

## 결과

- 넓이 — 주요 결과
- Signed area
- 둘레
- Centroid x
- Centroid y
- Number of vertices
- Vertex order

## 공식

$$
\begin{gathered} A = \frac{1}{2}\sum_{i=1}^{n}(x_i y_{i+1} - x_{i+1} y_i) \\[6pt] C_x = \frac{1}{6A}\sum (x_i + x_{i+1})(x_i y_{i+1} - x_{i+1} y_i) \end{gathered}
$$

## 계산 예제

### Wikipedia's pentagon

- Vertices in order (x, y per line): 1, 6 / 3, 1 / 7, 2 / 4, 4 / 8, 5
- Coordinates are in: 미터 (m)
- **넓이: 16.5 m²**
- **Number of vertices: 5**
- **Vertex order: Counterclockwise**
- **둘레: 24.307995 m**
- **Centroid x: 3.88888889 m**
- **Centroid y: 3.66666667 m**
- 검증 출처: Area 16.5 from the Wikipedia “Shoelace formula” worked example; Python 3.8 fractions: signed sum +33 (counterclockwise), centroid (35/9, 11/3); math.sqrt edge sum for the perimeter

### Rectangle 4 × 3

- Vertices in order (x, y per line): 0, 0 / 4, 0 / 4, 3 / 0, 3
- Coordinates are in: 미터 (m)
- **넓이: 12 m²**
- **둘레: 14 m**
- **Centroid x: 2 m**
- **Centroid y: 1.5 m**
- **Vertex order: Counterclockwise**
- 검증 출처: 4 × 3 rectangle; centroid at the centre

### Right triangle, centroid at the mean of the vertices

- Vertices in order (x, y per line): (0, 0) (4, 0) (0, 3)
- Coordinates are in: 미터 (m)
- **넓이: 6 m²**
- **둘레: 12 m**
- **Centroid x: 1.33333333 m**
- **Centroid y: 1 m**
- 검증 출처: ½ × 4 × 3; 3-4-5 perimeter; a triangle's centroid is the vertex mean (4/3, 1)

### Clockwise square (edge case: negative signed area)

- Vertices in order (x, y per line): 0 0; 0 2; 2 2; 2 0
- Coordinates are in: 미터 (m)
- **넓이: 4 m²**
- **Signed area: -4 m²**
- **Vertex order: Clockwise**
- 검증 출처: Shoelace sum for clockwise order is −2 × area

### L-shaped plot in feet

- Vertices in order (x, y per line): 0,0 / 6,0 / 6,2 / 2,2 / 2,5 / 0,5
- Coordinates are in: 피트 (ft)
- **넓이: 18 ft²**
- **둘레: 22 ft**
- **Centroid x: 2.33333333 ft**
- **Centroid y: 1.83333333 ft**
- 검증 출처: 6×2 + 2×3 = 18 ft²; Python 3.8 fractions: centroid (7/3, 11/6)

### Closed ring with the first point repeated (edge case)

- Vertices in order (x, y per line): 0 0 / 4 0 / 4 3 / 0 3 / 0 0
- Coordinates are in: 미터 (m)
- **넓이: 12 m²**
- **Number of vertices: 4**
- 검증 출처: The repeated closing vertex adds a zero-length edge; same rectangle as above

## 자주 묻는 질문

### How does the shoelace formula work?

Multiply each x by the next vertex's y, subtract the next x times this y, add the results all the way round and halve the absolute value. For (0, 0), (4, 0), (4, 3), (0, 3) the terms are 0, 12, 12 and 0, so the area is 24/2 = 12. The name comes from the criss-cross pattern the products make when the coordinates are written in two columns.

### Does the order of the points matter?

Yes. The points must follow the boundary, clockwise or counterclockwise, without jumping across. Direction only flips the sign: counterclockwise gives a positive sum, clockwise a negative one, and the area is the absolute value. The corners of a 2 × 2 square taken as (0, 0), (2, 2), (2, 0), (0, 2) trace a crossed bow-tie whose shoelace area is 0 instead of 4.

### How do you find the area of an irregular plot of land from its corners?

Record each corner as coordinates on a flat grid, such as eastings and northings in metres from a site plan, list them in order round the boundary and apply the shoelace formula. An L-shaped plot with corners (0, 0), (6, 0), (6, 2), (2, 2), (2, 5) and (0, 5) in feet covers 18 ft². Latitude and longitude must be projected first, because a degree of longitude shrinks towards the poles.

### How do you find the centroid of a polygon?

Weight each shoelace term by the sum of the two x coordinates involved: Cx = Σ(xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)/(6A), with A the signed area, and likewise for Cy. For a triangle this equals the average of the three vertices; for the L-shaped plot above it is (7/3, 11/6) ≈ (2.333, 1.833). The centroid of a non-convex shape can lie outside it.

### “좌표로 다각형 넓이 계산: 신발끈 공식”의 정확도는 어느 정도인가요?

정확도는 입력값과 계산 방법의 가정에 따라 달라집니다. 십진 연산은 유효숫자 50자리를 사용하지만, 추정값·수치해석 방법·원본 데이터의 정밀도는 더 낮을 수 있습니다. 표시값을 반올림해도 이러한 한계는 사라지지 않습니다. 독립적인 출처의 풀이와 대조한 계산 예시: 7. 예를 들어 “Wikipedia's pentagon”은 Area 16.5 from the Wikipedia “Shoelace formula” worked example; Python 3.8 fractions: signed sum +33 (counterclockwise), centroid (35/9, 11/3); math.sqrt edge sum for the perimeter와 대조해 확인합니다.

### 이 계산 방법의 출처는 무엇인가요?

Wikipedia, “Shoelace formula” — worked example with vertices (1, 6), (3, 1), (7, 2), (4, 4), (8, 5); Bourke, P. (1988) “Calculating the area and centroid of a polygon”.

## 출처

- [Wikipedia, “Shoelace formula” — worked example with vertices (1, 6), (3, 1), (7, 2), (4, 4), (8, 5)](https://en.wikipedia.org/wiki/Shoelace_formula)
- [Bourke, P. (1988) “Calculating the area and centroid of a polygon”](https://paulbourke.net/geometry/polygonmesh/)
