fullseye

絵では確かめられないもの(積分器の次数・リアプノフ指数・分岐・相関次元・極小曲面)

できること

力学系(軌道・ベクトル場・ポアンカレ断面・リアプノフ指数・分岐図・相関次元)と極小曲面(カテノイド・ヘリコイド・エンネパー・シェルク・ジャイロイド)を作り、恒等式と定義だけで採点します。軌道は管メッシュにして立体で見られます。

★この族は「見て分かる」が一切効きません。 ローレンツ・アトラクタの図は積分器が 1 次でも 4 次でも蝶に見え、極小曲面の図は平均曲率が 0 でなくてもきれいな曲面に見えます。ですから採点は全部絵の外から取ります(実測):

What it does

Integrate named dynamical systems (Lorenz, Rossler, harmonic, arbitrary linear A), sample their fields, take Poincare sections, compute Lyapunov spectra, bifurcation maps and correlation dimensions; build minimal surfaces (catenoid, helicoid, Enneper, Scherk, gyroid) and sweep a curve into a tube mesh — and score all of it with identities and definitions rather than by eye, because a Lorenz plot looks the same whether the integrator is 1st or 4th order and a surface looks smooth whether or not its mean curvature vanishes. RK4’s error falls by exactly 16 per halving against expm(At)x0 (Euler, the control, falls by 2); the sum of the Lyapunov exponents equals the trace identity -(sigma+1+beta) to 2.6e-06, independently of the tangent-flow/QR procedure that produced them; the logistic period-doubling points are the exact 3 and 1+sqrt(6), and the residual is attributed — the gate is not “the error is small” but “lengthening the burn-in shrinks it by 10.9x”, because convergence at a bifurcation is algebraic; the correlation-dimension bias on a bounded set is traced to the radius window, not the sample count (400 to 3,000 points does not move it; narrowing r_lo/r_hi moves 1.887 to 2.050); the field’s divergence equals tr(A) and its vorticity A10 - A01 as measured by the existing PIV ops, which know nothing about this family; a tube swept along a circle is a torus whose analytic volume 2*pi^2*R*r^2 and area 4*pi^2*R*r the existing mesh_volume / mesh_area confirm to 0.3 %; and the minimal surfaces have |H| medians of 1e-4 against controls of 1.00004 (unit sphere) and 0.50000 (unit cylinder), with the gyroid’s nodal-approximation residual reported rather than hidden.

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

向く: 数値解法の次数を実証する(教材・検証レポート)。カオス系の指標(最大指数・次元・分岐)を根拠つきで出す。制御・振動の線形系の位相図と発散・渦度を既存 PIV op で測る。軌道や曲線を管メッシュにして 3-D で見せる・印刷する。極小曲面を構造の下地にする(膜構造・格子・TPMS の足場)。ジャイロイドの固体マスクを 3-D プリント用のスキャフォールドにする(gyroid_solid_mask は numpy だけで動きます)。

向かない: 系は族名か係数配列で受けます —— callable を引数に取りません(型付き台帳は入力を sort で登録し、連鎖ファザーがデータから引数を組むので callable は載りません)。任意の常微分方程式を渡す口ではないので、独自の系は DYNSYS_SYSTEMS に足す側の仕事です。リアプノフ指数は接流の解ける系(解析的なヤコビアンを持つ 4 族)だけで、写像の指数や遅延埋め込みからの推定は入りません。分岐図はロジスティック・正弦・テントの 1 次元写像だけです。相関次元は max_points に間引くので(対の数が二乗で増える)、答えが要るときは半径の窓を明示してください —— 上の「できること」のとおり既定の窓は有界集合で低く出ます。gyroid_isosurface(メッシュ形)は scikit-image が要ります(固体形 gyroid_solid_mask は要りません) —— 引数で mesh か voxel が変わる関数には宣言 out 型を 1 つ与えられないので、別の op に分けてあります。極小曲面は閉形式の 4 族 + ジャイロイドで、任意の境界に張るプラトー問題は解きません。管メッシュは自己交差を検出しません(曲率半径より太い管を作れば管は自分を貫きます)。

最初の 1 本

import numpy as np
import fullseye as fs

# 積分器の次数を実証する(厳密解は expm(At)x0)
A, x0, T = np.array([0.0, 1.0, -1.0, 0.0]), np.array([1.0, 0.0]), 4.0
exact = np.array([np.cos(T), -np.sin(T)])
for dt in (0.04, 0.02, 0.01):
    st = fs.ode_flow_states("linear", A, x0, T, dt, "rk4")
    end = np.array([st["x0"][-1], st["x1"][-1]])
    print("dt = %.3f  誤差 %.3e" % (dt, np.linalg.norm(end - exact)))   # 刻み半分で 1/16

# リアプノフ指数の和はトレース恒等式に一致する(出し方と独立)
lam = fs.dynsys_lyapunov_spectrum("lorenz", t_end=120.0, dt=0.004, burn_in=20.0)
print("Sum lambda = %.6f / -(sigma+1+beta) = %.6f" % (lam.sum(), -(10.0 + 1.0 + 8.0 / 3.0)))

# 「これは極小曲面だ」を、作り方を知らない op が採点する
V, F = fs.ledger.minimal_surface("catenoid", nu=90, nv=140, extent=1.2)
H = np.abs(np.asarray(fs.ledger.vertex_curvature((V, F))))
print("|H| 中央値 %.5f(対照群の単位球は 1.0)" % np.median(H[np.isfinite(H)]))

裏づけ