3D slices of 4D objects

miegakure
4d

(Aris Nikolopoulos) #1

Hi,
this is not a question about a project but rather a discussion (If anybody is interested) about cutting slices of 4D objects in 3D space.

I saw the other day this video:

Where the creators of the game “miegakure” created 4D objects (It’s easy to calculate in 4D eucledian space apparently- just add one coordinate) and then presented on the screen only 3d slices of those shapes.

I bet this can be done in GH, and once I find some time I’ll give it a try, but I’m just asking if anybody else has tried something like this…


(Tom) #2

You don’t have too. Rhino already has 4d objects (excluding time) :slightly_smiling_face::

http://developer.rhino3d.com/api/RhinoCommonWin/html/T_Rhino_Geometry_Point4d.htm

If you follow the video, you could argue that a 3d nurbscurve/surface which is rational/weighted is actually a curve of higher dimension and the factor of weighting just looks 3d to us because we cannot imagine a higher dimension.


(Aris Nikolopoulos) #3

no pretty icons ha?

Anyway, Grasshopper never stops amazing me!!!
I have to accellerate my coding lessons’ pace!


(David Rutten) #4

Well, yes if you’re willing to do a lot of coding up front. None of the data types in RhinoCommon or GH are designed with more than 3 dimensions in mind. Even Point4d isn’t really a four-dimensional entity, the ‘d’ stands for ‘double-precision’, not ‘dimension’. It’s actually a three-dimensional homogeneous coordinate and should be considered as a scaling factor for the first three values (x, y, z).

In addition to 4-d points, vectors and planes (which are all reasonably straightforward), you’ll also have to create a 4-d mesh type (4-d tetrahedrons instead of 3-d triangles). This does not strike me as particularly straightforward. Then the intersection code for tetrahedrons and planes yielding a three-dimensional triangle mesh… phew, better you than me.