From e7807ada87bb3975176094604433ee77097329be Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Wed, 28 Oct 2026 04:53:32 +0000 Subject: [PATCH] =?UTF-8?q?lamp:=20square=20=CE=BE=20image=20so=20the=20qu?= =?UTF-8?q?arter=20turn=20still=20fills=20the=20frame;=20sharper=20brightn?= =?UTF-8?q?ess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FAqjv3n4yABxvJPJHFRhVA --- src/lamp/xi_image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lamp/xi_image.py b/src/lamp/xi_image.py index 2e50298..9973c85 100644 --- a/src/lamp/xi_image.py +++ b/src/lamp/xi_image.py @@ -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)