construct op• 데이터 종류: 없음 → table(인자만으로 정해지는 연산자 —— 이미지나 데이터 입력을 받지 않습니다)
• 호출: import fullseye as fs; fs.ledger.circle_packing_apollonian(curvatures=(-1.0, 2.0, 2.0, 3.0), depth=4, min_curvature=0.0)(구현을 직접 호출하려면 import mathops; mathops.circle_packing_apollonian(curvatures=(-1.0, 2.0, 2.0, 3.0), depth=4, min_curvature=0.0), 원장에서 가져오려면 opsmath.get("circle_packing_apollonian"))
데카르트 사원수 조합에서 만드는 아폴로니우스 원 채우기 —— 모든 원이 정리를 지고 있다.
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
Four mutually tangent circles satisfy the Descartes circle theorem
(k1 + k2 + k3 + k4)**2 == 2 * (k12 + k22 + k32 + k42)
where `k = 1/r` is the curvature (negative for the enclosing circle). The
theorem is quadratic in `k4`, so a triple of mutually tangent circles has
two solutions and the second is `k4' = 2*(k1+k2+k3) - k4`; recursing on
that reflection fills the gasket. The centres follow the complex form
`k4*z4 = k1*z1 + k2*z2 + k3*z3 +- 2*sqrt(k1*k2*z1*z2 + ...)`, so no
geometry is fitted — every circle is produced by an exact algebraic step.
★Why this earns its place: the drawing carries its own proof. Each circle
can be checked against Descartes to machine precision, tangency is
`|z_i - z_j| == |r_i +- r_j|` exactly, and **an integral quadruple stays
integral for ever** — start from `(-1, 2, 2, 3)` and every curvature in the
infinite packing is an integer (Lagarias-Mallows-Wilks). A drawing routine
that is slightly wrong cannot keep integers integral.
Parameters
----------
curvatures : 4 floats
A Descartes quadruple. The default `(-1, 2, 2, 3)` is the smallest
integral gasket. Must satisfy the theorem to `1e-9` relative.
depth : int >= 0
Reflection levels. Level 0 is the four seed circles; each further level
adds `4 * 3**(level-1), so the total is 2 * 3**depth + 2`.
min_curvature : float
Drop circles smaller than `1/min_curvature` (0 = keep all).
Returns a `table: x, y, radius, curvature, depth`
(the enclosing circle has negative curvature and positive radius).
Raises `ValueError`: not four curvatures; the quadruple does not
satisfy Descartes; every curvature negative or zero (no packing); `depth`
negative or so large the packing exceeds the cap; non-finite input.
HALCON: no operator.
mathops 의 모든 연산자는 입력을 검증한 뒤에 계산합니다(조용히 통과시키지 않습니다):
• **complex 입력은 ValueError** —— float64 로의 강제 변환은 허수부를 조용히 버립니다(numpy 는 ComplexWarning 만 내고 「그럴듯하게 틀린」 실수를 돌려줍니다). .real/.imag/abs() 를 명시하거나 복소수를 다루는 complexops 를 쓰세요.
• **masked 요소가 있는 masked array 는 ValueError** —— 마스크를 벗겨 아래 원값을 쓰는 암묵 변환을 거부합니다. 채울지 버릴지를 명시하세요.
• **NaN/Inf 는 모든 입력에서 ValueError**(개수를 명시하고 거부 —— 결과 전체로 전파되므로).
• 형상은 엄격: 1-D 와 2-D 를 암묵적으로 승격·브로드캐스트하지 않습니다(vector 슬롯에 matrix, matrix 슬롯에 vector 는 ValueError. reshape 를 명시하세요).
• 크기 상한: 행렬을 받는 연산자와 stat_histogram 의 bins 는 mathops.MAX_ELEMENTS(2^26 ≈ 6700 만 요소)를 넘으면 ValueError.
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.
• poc_theorems_as_pictures — py -3.11 examples/poc_theorems_as_pictures.py
table 를 입력으로 받는 것)construct)ford_circles · phyllotaxis_pattern · neighbour_index_gaps · ifs_fractal · ifs_similarity_dimension · space_filling_curve · curve_locality
*Provenance: mathops.py — MATH 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.