Doing some experiments with #RayTracing #ComputerGraphics using #Bonzomatic #GLSL #shader editor.
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.
Future enhancement ideas:
- handle polarised light properly (currently I ignore polarisation, simply averaging the Fresnel reflection coefficients)
- wavelength-dependent index of refraction and absorption
- anti-aliasing (currently the edges are steppy as there is only 1 sample per pixel in a regular grid)
- 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)
- do 4D->3D slicing on CPU instead of every ray bounce
- add other 4D shapes
#Polarisation is something I haven't done before, so I'm curious to see how to implement it and how it changes appearance.