fullseye

うなりは一つ(膜のモード・干渉縞・回折次数・印刷のモアレ・墨に落とす)

できること

膜の固有モードと節線、二重スリットの干渉縞、回折格子の次数、そして印刷の網点・モアレ・彫版線・ハッチ・モザイクを作り、どれも絵の外にある真値で採点します。

二重スリットの縞と、2 版を重ねた網点のモアレは教科書では別の章に載っていますが、どちらも「2 つの周期構造の周波数ベクトルの差」であって式は 1 本しかありません。この層はその 1 本を両側から確かめます(実測):

★絵の良さではなく、保った量と捨てた量を数で言うのがこの層の主張です。既存の NPR ライブラリは絵しか返しません —— 差はそこにあります。

What it does

Build membrane eigenmodes and nodal lines, two-slit fringes, grating orders, and the printing side (halftone screens, moire, engraving lines, structure-following hatching, mosaic tiles) — and score every one of them against a truth that lives outside the picture. The thesis: a two-slit fringe and the moire of two superposed halftone screens are the same beat, the difference of two frequency vectors, so one formula is checked from both ends. Rectangular membrane eigenvalues match pi^2 (m^2/a^2 + n^2/b^2) to 0.00e+00 including the degeneracies (the widely quoted mn*pi is a product and is a different sequence); circular nodal circles sit at the zeros of J0 (the zeros of J'0 are the antinodes); the fringe period lambda*D/d is measured back by a different op (ratio 0.998-1.003); grating orders round-trip through the existing grating_wavelengths to 550.000000 nm and agree with the existing fraunhofer_pattern, where a 50 % duty grating drops the even orders and the 3rd/1st intensity ratio is sinc(m/2)^2 = 1/9; the moire period is predicted before drawing and confirmed by FFT (0.948-0.986); halftoning discards tone but preserves local mean density (0.0517 mean absolute error through a 4-period window); engraving ink coverage matches the closed form w/d to 0.0000; hatch direction comes from the existing structure_tensor_orientation and lands within 0.3 degrees of a grating whose angle is known by construction; and Lloyd’s energy, measured by the existing stipple_energy, decreases monotonically with the cell mean being the exact L2 optimum.

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

向く: 印刷・製版の設計(スクリーン角度の組み合わせを刷る前に決める)。光学の教材図版を採点つきで作る。干渉計・格子分光器の設計の当たりを取る(次数と角度)。写真を墨に落とす様式化で「どれだけ濃度を保ったか」を数で言う。ペンプロッタ・レーザー彫刻の線の設計(被覆率が閉形式で解ける)。

向かない: クラドニ板そのものは扱えません(膜の解であって板の重調和解ではない)。wave_two_slit はフラウンホーファー領域の遠視野で、近接場やフレネル領域は既存 angular_spectrum_propagate の仕事です。膜のモードは矩形と円の解析解だけで、任意形状の固有値は解きません。wave_fringe_period は1 本の支配的な周期を返すので、複数の周期が重なった像では最大の山しか見ません。モアレの予言は同じ形のスクリーン 2 枚の場合で、3 版以上や点形状の違いによる 2 次のうなりは入りません。網点・彫版・ハッチはすべて閾値で墨に落とすので、出力は 2 値に近い image2d であって連続階調ではありません。hatch_field は画素ごとに 1 つの向きしか持てないため、交差や分岐(構造テンソルが等方になる所)では向きが任意になります —— そこを信じてよいかを言うのは向きではなくコヒーレンス(既存 structure_tensor_coherence)です。モザイクの母点は Lloyd 反復なので局所最適に落ちます(反復を増やしても大域最適は保証しません)。

最初の 1 本

import numpy as np
import fullseye as fs

# 刷る前にモアレの周期が分かる(2 版の周波数ベクトルの差)
p = fs.ledger.halftone_moire_period(lpi_a=60.0, angle_a_deg=45.0,
                                    lpi_b=60.0, angle_b_deg=75.0, pixel_um=25.4)
print("モアレの周期 %.2f px / 向き %.1f 度" % (p["period_px"][0], p["angle_deg"][0]))

# 縞間隔は作った op とは別の op が測り返す
img = fs.wave_two_slit(wavelength_nm=550.0, slit_sep_um=200.0,
                       distance_mm=200.0, shape=(64, 1024), pixel_um=5.0)
print("縞間隔 実測 %.2f px / lambda*D/d = %.2f px"
      % (fs.wave_fringe_period(img), 0.55 * 200e3 / (200.0 * 5.0)))

# 膜の固有値は平方和(積の mn*pi ではない)
print("正方膜 lambda/pi^2 =",
      np.round(fs.wave_mode_frequencies("rectangular", 8, 1.0) / np.pi ** 2, 4))

裏づけ