Loading...
2023. 8. 31. 21:10

다각형 내부의 격자점 수를 셀 수 있을까 - 픽의 정리(pick's theorem) + (선분에 있는 격자점의 개수 세는 방법)

1. 픽의 정리(pick's theorem) 좌표가 모두 정수인 점을 격자점(lattice)이라고 부른다. 2차원 좌표평면에서 모든 꼭짓점이 격자점인 다각형이 자기 자신이 교차하지 않을때(not self-interaction), 넓이가 A이고 내부에 있는 격자점의 개수가 I이며 둘레(변)에 있는 격자점의 개수가 B이면... $$A = I + \frac{B}{2} - 1$$이 성립한다. 여러 경우의 수로 나눠서 증명하는데, 조금 까다롭다... 읽어보는걸로 만족하고 생략 https://www.youtube.com/watch?v=GTeZd_IdcoY 영상이 설명을 잘해주고 있는데... 주어진 다각형을 내부의 격자점 수가 0개이고 경계선 위 격자점의 개수가 3개인 삼각형으로 도형을 모두 분할할 수 있고, 이 삼..

2023. 8. 5. 02:00

기하학 알고리즘의 기본 - 두 벡터의 외적(cross product)에 대하여

https://gaussian37.github.io/math-la-cross-product/ 벡터의 외적이란? gaussian37's blog gaussian37.github.io https://cp-algorithms.com/geometry/basic-geometry.html#definition_1 Basic Geometry - Algorithms for Competitive Programming Basic Geometry In this article we will consider basic operations on points in Euclidean space which maintains the foundation of the whole analytical geometry. We will consid..