From: Thorsten Kiefer on
Hi,
I'm starting to program a 4-dimensional raytracer.
But before I finish it I want to know if this is interesting for anyone,
if not, I'll stop it.
By the way is this the right newgroup ?
I post it here, because the sense of the program is not
amazing graphics, but to give a better visual insight into
understanding the fourth dimension.
It is easy with spheres.
I put spheres at (0,0,0,0),(1,0,0,0),(0,1,0,0),(1,1,0,0) and so on.
I.e. in the edges of the 4d hypercube.
I even implement lighting, as the normal of a hypesphere's suface is
just the normalized difference vector of the intersection point and it's
middle point. The cross product does not exist in 4d space, so we have a
problem computing normals of planes. My idea is to generate a square plane
in the xy-plane and set it's normal parallel to the z-axis. Then rotate,
scale and
translate it in 4d-space until it fits the desired 4d plane.
this way we have a 2-dimensional plane in 4d-space with even a normal
vector, and now we can implement lighting !
What is that good for ?
Imagine 2 simple 3d-scenes made up of triangles.
We put these scenes on 2 different positions along the 4th axis.
I guess with the right camera position and rotation we only see one scene.
And if we move the camera along the 4th axis we can switch between the both
scenes.
Now another trick is to not use 2-dimensional triangles to make up the
scenes but to use tetraeders to connect the both scenes.
Adjusting the camera propperly would make the tetraeders look like
triangles.
Now the clou : rotating the camera around the both scenes in 4d-space
would result in some kind of mixture of the both scenes. And that is
what i want to see. And I hope people will have a highly educational
purpose - i.e. understanding 4 dimensions.

Best Regards
Thorsten
From: Tim Little on
On 2010-07-16, Thorsten Kiefer <t.kiefer(a)tokis-edv-service.de> wrote:
> The cross product does not exist in 4d space, so we have a problem
> computing normals of planes.

More precisely, every plane has infinitely many normals. That's not
actually a problem, as surfaces of 4D objects are tangent to
hyperplanes, not planes. Instead of using triangles to construct
approximations to surfaces, you would use tetrahedra.


- Tim