claude<p>Doing some experiments with <a href="https://post.lurk.org/tags/RayTracing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RayTracing</span></a> <a href="https://post.lurk.org/tags/ComputerGraphics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ComputerGraphics</span></a> using <a href="https://post.lurk.org/tags/Bonzomatic" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bonzomatic</span></a> <a href="https://post.lurk.org/tags/GLSL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GLSL</span></a> <a href="https://post.lurk.org/tags/shader" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>shader</span></a> editor.</p><p>I define a 24-cell as the intersection of 24 half-spaces in 4D (with normals all permutations of (±1,±1,0,0)), then slice through constant 4th coordinate to get a 3D object, and simulate it as a glass-like material with reflection and refraction.</p><p>Future enhancement ideas:</p><p>- handle polarised light properly (currently I ignore polarisation, simply averaging the Fresnel reflection coefficients)</p><p>- wavelength-dependent index of refraction and absorption</p><p>- anti-aliasing (currently the edges are steppy as there is only 1 sample per pixel in a regular grid)</p><p>- improve efficiency (internal ray bounce is O(N^2) where N is the number of surfaces, could probably be O(N) with some extra maths insights)</p><p>- do 4D->3D slicing on CPU instead of every ray bounce</p><p>- add other 4D shapes</p><p><a href="https://post.lurk.org/tags/Polarisation" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Polarisation</span></a> is something I haven't done before, so I'm curious to see how to implement it and how it changes appearance.</p>