biVector forum

Visualizing a 4D object in 3D space

Hi, as a retired IT guy out of curiosity I am trying to visualize a 4D object in 3D space (hypercube/hypersphere, etc) using 3D Creation software (Blender). With python running within Blender i can get the vertices, edges and face information of a 3D object and “extrude” all these into 4D (x,y,z to x,y,z,w) to get the hyper version of this object.

After using a transformation matrix to translate and/or rotate the 4D object vertices and edges I use the Algebraic Form of the line-plane intersection formula described in (Line–plane intersection - Wikipedia) to determine the 4D intersection of each 4D edge (consisting of 2 vertices each) with the 4D space defined by vertex [0,0,0,0] and normal [0,0,0,1].

I then remove the last column of all the 4D intersections to get into the 3D realm x,y,z,w → x,y,z and use a Convex Hull algorithm to generate a 3D object from all these intersection vertices.

Running the python program i see the 3D object view of the hyperobject is indeed generated in Blender and with hypercubes It seems to also work as it should when translating and or rotating the 4D hypercube.

Unfortunately, with a Hypersphere translated in steps trough 4D i have the issue that the generated 3D sphere appears from nothing and then disappears completely while I should see the generated 3D sphere appear slowly from from nothing->small->100% and then slowly disappear from 100%->small-> nothing as I translate the hypersphere in steps through the fourth dimension passing [0,0,0,0] where the hypersphere is located in 4D.

I believe the problem lies in either or both the following:
(1) the method used to get the intersection between the 4D edges and the 4D space defined by vertex [0,0,0,0] and normal [0,0,0,1] and/or
(2) the method used to reduce the 4D intersection vertices to 3D.

Although I have followed many of the available YouTube presentations and documents on Geometric/Clifford Algebra found on the internet i was not able to get the right understanding to apply it concretely to this situation.

Can someone nudge me in the right direction with some concrete suggestions on how to go about this in GA using the 4D vertices/edges/face data I have access to?

Many thanks.

Expanding on the above, here’s a Youtube link which shows some examples of what what i am seeing now using the projection method described above. The video shows in sequence 3 rotations and 1 translation of a hypersphere. As you can see with the translation the 3D sphere suddenly appears 100% as the translated hypersphere enters the 3D space and disappears completely when the hypersphere leaves the 3D space. The 3D space is located at w=0.