삼각형 안에 3개의 원이 들어가는지 확인 (Check if three circles fit inside a triangle)


문제 설명

삼각형 안에 3개의 원이 들어가는지 확인 (Check if three circles fit inside a triangle)

나는 주어진 지름을 가진 세 개의 원이 서로 겹치지 않고(만지는 것은 괜찮음) 주어진 변의 길이를 가진 삼각형 안에 들어갈 수 있는지 알려주는 프로그램을 작성하는 것에 대해 잠시 생각했습니다.

어떻게 할까요? 그렇게 할 생각?


참조 솔루션

방법 1:

I would try to find some way to enumerate the possible configurations for the three circles, and then test each configuration until one is found where the three circles fit, or until all configurations have been tested and rejected.

(In what follows I am assuming that each circle is known to fit in the triangle by itself. Obviously if any circle fails to fit by itself then it fails to fit in any configuration of three circles.)

Configuration (1) involves putting a circle in each corner of the triangle. (This is the configuration that everyone spotted.)

a triangle with a big green circle in the top corner, a medium red circle in the bottom right corner, and a small blue circle in the bottom left corner

There are six ways to arrange the circles, and for each arrangement it sufficient to check whether the circles will fit pairwise:

circle with centre O₁ and radius r₁ in the bottom left corner of a triangle (marked A with angle α) and circle with centre O₂ and radius r₂ in the bottom right (marked B with angle β)

The distance AS₁ is r₁/tan(½α), the distance S₂B is r₂/tan(½β), and the distance S₁S₂ is √((r₁ + r₂)² − (r₁ − r₂)²) = 2√r₁r₂

The circles fit if AS₁ + S₁S₂ + S₂B ≤ AB.


In configuration (2) we place two circles into two of the corners of the triangle, and the third circle between these two and one of the two edges that's not touching both circles:

a thin triangle with a big green circle in the top left corner, a medium red circle in the right corner, and a blue circle between them and the top edge

Figuring out whether these will fit is a bit more complex:

the thin triangle marked up: T is where the altitude from centre of the big circle meets the left edge, and S₁ to S₃ are where altitudes from the centres of the three circles meet the bottom edge

To find the length AS₁ we have to walk round the triangle from corner C via the point T. I'll leave the details of this as an exercise.

There are eighteen ways to arrange the circles into this configuration.


Is there a configuration (3)? I looked but couldn't find one that couldn't be turned into one of the two I gave. For example, if all three circles touch the same side then there's always room to swap the middle circle over to the opposite side, getting configuration (2). However, enumeration of geometric configurations is always tricky and I could easily have missed one.

방법 2:

Just a guess: your problem could be related to that of Appolonius's circles.

I ran into it while trying to fit recursively 3 circles within a 4th one without any intersection for some fractal animation, so it may be worth a try.

You'll find it explained in length at Wolfram (this problem was solved only in 1968): http://mathworld.wolfram.com/ApolloniusProblem.html

방법 3:

this seems to be a tough and interesting problem. Through the solution of the Marble Problem (related to Malfatti's Circles) by Los and Zalgaller in 1994, it might be possible for you to tediously extract a necessary condition for existence of a configuration of three non‑overlapping circles with given radii inside a triangle with prescribed side lengths. If you can place them inside the triangle, the sum of their areas will be at most the maximal possible area for three triangles inside a circle. The Marble Problem is the problem of determining the maximal area of three non‑overlapping circles inside a given triangle. Right now, I can't see that this is also sufficient.

Perhaps it would be worth, as a start, to introduce an ε to the problem and then look for an algortihm that in a finite number of steps, could determine if a configuration which is at most "bad by ε" (defined in some sensible way) exists.

Some of the World's top mathematicians participate regularly at stackoverflow's sibling, mathoverflow.org, so you could try posting this problem over there.

Thanks for posting this.

방법 4:

I think it's sufficient to try all 6 possible permutations (A1 B2 C3, A2 B1 C3, A1 B3 C2, A3 B1 C2, A2 B3 C1, A3 B2 C1). If a circle isn't tangent to two edges of the triangle, then it's placement is suboptimal in some sense and you could make more space for the other two by sliding it into a corner. If it's possible to stick three circles in a triangle without them overlapping then it's probably possible to slide them into the corners (for the case in which they're all jammed against the edges, lift them all up together and rotate by 60 degrees). Of course, this isn't a rigorous proof, but I'm pretty sure it works. Furthermore, I imagine the solution will always be to place the largest circles at the widest angles, because those are the ones that could potentially take up the most central triangle space.

(by faximanGareth ReesMoonSilexuser531602dspyz)

참조 문서

  1. Check if three circles fit inside a triangle (CC BY‑SA 3.0/4.0)

#geometry #math






관련 질문

이미지를 사용하지 않고 Nx2 행렬에서 원의 반지름을 어떻게 찾을 수 있습니까? (How could I find the radius of a circle in a Nx2 matrix, not using images)

d3.js의 궤도 유형 차트 (Orbit type chart in d3.js)

원의 둘레에 스프라이트 추가 (Add a sprite on circumference of a circle)

Java: 질량 중심을 중심으로 삼각형 회전 (Java: Rotate triangle around mass center)

값이 없는 경우 HTML5 로컬 저장소 개체는 무엇을 반환합니까? (What does the HTML5 Local Storage object return if there is no value?)

WordPress에서 Simple Jquery Click이 작동하지 않음 (Simple Jquery Click not working in WordPress)

직사각형 필드 내에서 다양한 크기의 직사각형을 효율적으로 배치 (Efficient placement of variable size rectangles within a rectangular field)

{'northeast': {'lat':}, 'southwest': {'lat': }}(Google 지도) Python에서 다각형을 만드는 방법 (How to create Polygon out of {'northeast': {'lat':}, 'southwest': {'lat': }} (google maps) Python)

실린더 슬라이스를 따라 두 점 사이의 SVG 경로 호를 계산하는 방법 (How to calculate SVG path arc between two points along the slice of a cylinder)

make_solid() PostGIS를 사용하여 꼭짓점 테이블에서 polyhedralsurfaceZ 생성 (Create polyhedralsurfaceZ from vertex table with make_solid() PostGIS)

시작/끝 각도 문제가 있는 OpenGL 타원 (OpenGL Ellipse with start/end angle issues)

2D 그리드의 두 선분이 인접하는지 테스트하는 알고리즘 (Algorithm to test if two line segments on a 2d grid are adjacent)







코멘트