lamp: square ξ image so the quarter turn still fills the frame; sharper brightness
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FAqjv3n4yABxvJPJHFRhVA
This commit is contained in:
1 parent
f7f167dbf5
commit
e7807ada87
1 file changed
+4
-4
@@ -1,9 +1,9 @@
|
||||
# Paint xi in the u-chart, u = 1/(4(s - 1/2)), as a 1920x1080 PNG (supersampled 2x), and trace the |xi| = 1 contour (the edge of the dark cone).
|
||||
# Paint xi in the u-chart, u = 1/(4(s - 1/2)), as a square 1920x1920 PNG (supersampled 2x; the frame shows the middle 16:9 of it, so a quarter turn still fills the frame), and trace the |xi| = 1 contour (the edge of the dark cone).
|
||||
import numpy as np, json
|
||||
from scipy.special import loggamma
|
||||
from PIL import Image
|
||||
W, H, SS = 1920, 1080, 2
|
||||
HW_Y = 0.016 # half-height of the window in u
|
||||
W, H, SS = 1920, 1920, 2
|
||||
HW_Y = 0.02844 # half-height of the window in u
|
||||
PPU = H*SS/(2*HW_Y) # pixels per unit of u (supersampled)
|
||||
BC = [1/12,-1/720,1/30240,-1/1209600,1/47900160,-691/1307674368000,1/74724249600,-3617/10670622842880000,43867/5109094217170944000,-174611/802857662698291200000]
|
||||
N = 160
|
||||
@@ -29,7 +29,7 @@ ok = r2 > (1/(4*900))**2 # |s - 1/2| < 900: within
|
||||
L[ok] = log_xi(s[ok])
|
||||
mag, ph = L.real, L.imag
|
||||
h = (ph/(2*np.pi)) % 1.0
|
||||
v = 0.14 + 0.74*(0.5 + np.arctan(0.7*mag/2.5)/np.pi)
|
||||
v = 0.14 + 0.74*(0.5 + np.arctan(0.7*mag/1.5)/np.pi)
|
||||
v = np.where(ok, v, 0.16); h = np.where(ok, h, 0.0); sat = np.where(ok, 0.62, 0.0)
|
||||
# hsv -> rgb
|
||||
i = np.floor(h*6).astype(int) % 6; f = h*6 - np.floor(h*6)
|
||||
|
||||
Reference in new issue
Block a user