fullseye

定理が門になる図(アポロニウス・フォード・測地ドーム・葉序・IFS・空間充填曲線)

できること

数学的に美しい図を描きます —— 互いに接する円の充填、ファレイ数列のフォード円、正二十面体からの測地ドーム、葉序の螺旋、IFS のアトラクタ、空間充填曲線。

★これらの図はきれいなので、合っているかを誰も確かめません。 実装が少し間違っていても、円は詰まるし螺旋は回るしフラクタルはフラクタルに見えます。そこでこの層は、絵とは独立の真値を必ず持つものだけを入れています(実測):

What it does

Draw mathematically beautiful figures whose correctness is asserted by a theorem rather than by eye: an Apollonian gasket (every tangent quadruple satisfies Descartes’ circle theorem to 1e-13, and an integral seed stays integral for ever), Ford circles (tangency agrees with |ps - qr| = 1 on all 1,081 pairs, and the count matches 1 + sum of Euler's totient), a geodesic dome (exactly 12 degree-5 vertices at every subdivision — counted by the existing graph_degree_table, not by this module), Vogel’s phyllotactic spiral (neighbour index gaps land on Fibonacci numbers only at the golden angle: 7/7 against 2/7 for the controls), IFS attractors (Moran’s closed-form dimension agrees with the existing box-counting fractal_dimension, and non-similarity maps are refused), and space-filling curves (a permutation of 4^n cells with unit steps; locality reported as a table, not a slogan).

向くところ / 向かないところ

向く: 数学の図版(記事・教材・表紙)を採点つきで作る。空間充填曲線の局所性を根拠つきで比べる(ストレージ配置・タイル順・描画順)。測地ドームを構造や球面サンプリングの下地にする。葉序を点の配り方(ほぼ一様で格子でない)として使う。

向かない: アポロニウスの充填は depth に対し円が 3 のべきで増えます(depth 10 で 118,100 個)。フォード円は分母の二乗で半径が縮むので、分母 30 を超えると多くが 1 画素を割ります。IFS のカオスゲームは点を打つので、細かい隙間は点数を増やさないと埋まりません(箱数えの次元が閉形式より上に出るのはそのため)。空間充填曲線は order に対し 4 のべきで点が増えます(order 10 で 1,048,576 点)。モランの式は相似写像にしか使えません —— アフィンだが相似でない写像(シダ)は拒否します。

最初の 1 本

import fullseye as fs

# 定理が門になる: 接している 4 円は (Σk)² = 2Σk² を満たす
t = fs.ledger.circle_packing_apollonian(curvatures=(-1, 2, 2, 3), depth=4)
print(len(t["x"]), "円 / 曲率は整数のまま:", abs(t["curvature"] - t["curvature"].round()).max())

# 絵を見ずに斜列を数える(黄金角のときだけフィボナッチ)
pts = fs.ledger.phyllotaxis_pattern(n_points=800)
gaps = fs.ledger.neighbour_index_gaps(pts, k=6)
print("番号差の山:", gaps.argsort()[::-1][:5])

裏づけ