Each pringle is a 2D surface embedded in 4D (c, z) space. The surface is defined implicitly by:

$$ f_c^p(z) - z = 0 $$

which provides a way to calculate the surface normal vector:

$$ n = \left( \frac{ \partial f^p }{ \partial c } , \frac{ \partial f^p }{ \partial z } - 1 \right) $$

The derivatives can be calculated by the usual iterative process:

```
dc = 0
dz = 1
z = z_0
p times do:
dc := 2 * dc * z + 1
dz := 2 * dz * z
z := z * z + c
```

This allows for 4D lighting calculations, pretty much the same as in 3D (see https://hollasch.github.io/ray4/Four-Space_Visualization_of_4D_Objects.html#s5.5 ).

But when I tried it the results were too confusing because of the 4D to 3D perspective projection: `ray4` for example uses slicing along the 4th dimension instead of projecting the whole space.

#maths #4d #ImplicitSurface #lighting

Four-Space Visualization of 4D Objects - Index

The HTML version of Steve Hollasch's 1991 master's degree thesis 'Four-Space Visualization of 4D Objects'.