0%

Ray Tracing on 4-Dimensional Scene

N-1 Dimensional Objects in N Dimensional World

In this chapter we are going to explore the perspective of a 4D creature when he looks down to our 3D world.

N Dimensional Objects have 0 thickness in the (N+1)th dimension. When calculating the intersection between N+1 Ray and N-Simplex, then equation is under constrained.

One solution is to remesh to geometry with N+1 Simplex. For example a 3D ray is hard to cannot intersect with edges of a rectangle. But after triangulate the rectangle to two triangles, the intersection will be possible. Likewise, to intersect a 3D triangle mesh with a 4D ray, tetrahedralization is required.

Estimate the Number of Simplices

  • Surface of a regular triangle with edge length \(a\): \(\frac{\sqrt{3}}{4}a^2\)
  • Volume of a regular tetrahedron[1] with edge length \(a\): \(\frac{\sqrt{2}}{12}a^3\)

For a sphere with radial \(r\), one need \(N_2\) triangle to triangulate the surface.

\[ \begin{align} N_2 &= \frac{S_{sphere}}{S_{triangle}} \\ &= \frac{4 \pi r^2}{ \frac{\sqrt{3}}{4}a^2 } \\ & \leq O \left( \left( \frac{r}{a} \right)^2 \right) \end{align} \]

But \(N_3\) tetrahedrons to tetrahedralizate the volume:

\[ \begin{align} N_3 &= \frac{V_{sphere}}{V_{tetrahedron}} \\ &= \frac{ \frac{3}{4} \pi r^3}{ \frac{\sqrt{2}}{12}a^3 } \\ & \leq O \left( \left( \frac{r}{a} \right)^3 \right) \end{align} \]

The estimation gives an upper bound because the sphere is the geometry with smallest surface area-volum-ratio. But it still shows the computational complexity which changes from \(O(n^2)\) to \(O(n^3)\) when using a tretraheron to mesh the geometry instead of triangle.

Prism: A Better Solution

Convex Geometry in N-1 D Subspace

As shown in the figure above, we decompose the N-Ray to two rays. A (N-1) D ray for the subspace and a 1-D ray for axis direction of the prism. When the geometry in (N-1) D subspace is convex, each ray produces a time interval in intersection denote as \(T_s, T_h\). The actual intersection time interval can be calculated as \(T = T_s \cap T_h\).

General Geometry in N-1 D Subspace

For concave geometry case, the intersection of N-1 D subspace generates more than one time interval.

Dimensional Escalation

Now consider a 4D scene. A 3D geometry is viewed by a 4D camera.

Fig.2-1 Geometry in 3D Subspace

Fig.2-2: Image from 4D Camera

Reference

  1. mathworld.wolfram.com, Regular Tetrahedron