Show HN: Visualize rotating objects from the 4th, 5th, nth dimensions (ncube.ndavd.com)
ncube allows you to visualize rotating hypercubes of arbitrary dimensions. It works by rotating the hyperdimensional vertices and applying a chain of perspective projections to them until the 3rd dimension is reached. Everything is generated in real time just from the dimension number.
The application is fully free and open source: https://github.com/ndavd/ncube. There, you'll find some demos, more detailed explanation and how you can test it out yourself. Binaries for Windows, Mac and Linux are available: https://github.com/ndavd/ncube/releases/latest There's also a web version that runs fully on the browser: https://ncube.ndavd.com
If you like the project I'd appreciate if you could give it a star on GitHub ♥ If you have any issue or feature request please submit at https://github.com/ndavd/ncube/issues
-- EDIT DEC13 2023: IMPORTANT NOTICE --
https://ncube.ndavd.com MIGHT BE DOWN FOR YOU.
I deeply appreciate all the attention and feedback that ncube has been having this last day.
Alas it has become too big for the free hosting that I'm currently using and has exceeded my available monthly bandwidth.
I will be fixing it soon. In the meantime I recommend using the native binaries from https://github.com/ndavd/ncube
UPDATE: https://ncube.ndavd.com IS BACK ONLINE and with a performance boost. Should load faster now.
-- EDIT DEC17 2023 --
If ncube is leaving your system unresponsive it should be due to a recent Chromium issue with hardware acceleration affecting at least all Chromium-based web browsers on Linux. In case you're on Brave downgrading to 1.60 fixes it.
- 0xndavd
118 comments
[ 4.7 ms ] story [ 152 ms ] threadMaybe I don't fully understand what's going on here, but what causes it to run slowly? For a 5D cube, I would have thought you only need to transform 32 points. That surely isn't much work per frame. Are you rendering with WebGL?
You also mention GPU acceleration, but I believe WebGPU support is still a bit spotty, if that’s what you’re using. WebGL 2 is widely supported and WebGL 1 is nearly universal.
Edit to add: I hope I’m not being overly critical -- the app looks very nifty and it’s cool that you were able to bring it to the web at all!
Edit: Here's the bug as a screen cap:
https://vimeo.com/893937641/e7d12262c8
Also, please test out the native version of ncube, I provide some pre-compiled binaries for Mac, Linux and Windows. They should perform better. The web port was a nice to have, but the native versions will always perform way better.
When moving from 4->3 they become [0,0,1].
When moving from 3->4 they become [0,0,0,1,0,0].
Clicking 'reset' or manually changing the w slider to [0,0,0.5,1,0,0] results in the expected animation.
5: q1q4 = 0.5, q2q3 = 1.0, rest = 0.0 5->4: q1q4 = 0.5, q2q3 = 1.0, rest = 0.0 4->3: We no longer have the q1q4 plane available therefore q2q3 = 1.0, rest = 0.0 3->4: Now we have the q1q4 plane back but the state has been cleared from previous interactions Going to a lower dimension essentially deletes previously set state of higher dimensional planes because they don't exist at that point.
When resetting it just goes back to the default configuration.
https://www.rudyrucker.com/thefourthdimension/
I'll be honest: I can't visualise anything beyond 3 dimensions, so I have no idea if my attempt even comes close to being accurate. To me the result looks like a spinning cube which also thinks it's a torus trying to eat itself. I think the cube should be trying to eat itself in (at least) 3 directions as it spins in 4d?
2. Yeah this 5-D thing is easy to understand when you flatten to 2-D
3. Changes the rotation velocities sliders
4. Waaaaaaat! Don't understand this 5-D thing at all!
Dual Xeons with RX580 doesn't break a sweat — about 20% GPU load.
I could not have imagined seeing what I was going to see, and having seen it, I still don't intuitively understand why it looked the way it did.
I suppose the problem is that I have no experience of anything but a 3D world. I can imagine 3D to 2D embeddings but nothing beyond that.
From a quick look, it looks like the app tries to take a nD object and project it down to 3D and render that in 2D while using rotation to demonstrate... something?
I work with nD arrays and the only way I can visualize them (to the extent that I can visualize anything in my head; it's tough) is either by making 2D planes and viewing those or by looking at the node connections (like in a hypercube). Even then I don't think that's conceptually anything like "comprehending" high dimensional geometry in its native state.
* Even ordinary 3-dimensional cubes have surprises -- such as that some cross-sections the cube are regular hexagons.
Currently there's no support for cross-sections, and I'm not sure how they could be integrated in the current flow. But feel free to submit a feature request over on the discussions page of the repository. I'll see what I can do.
(and as arrel pointed out, 4D toys. There was a patch released recently that allows it to display projections, vice slices which is what the game originally did.)
[drm:amdgpu_job_timedout [amdgpu]] ERROR ring gfx_0.0.0 timeout, but soft recovered [drm:amdgpu_job_timedout [amdgpu]] ERROR ring gfx_0.0.0 timeout, signaled seq=344186197, emitted seq=344186200 [drm:amdgpu_job_timedout [amdgpu]] ERROR Process information: process Vivaldi-Gpu pid 1111641 thread vivaldi-bi:cs0 pid 1111675 GpuWatchdog[1262135]: segfault at 0 ip 00007f20dfcfbbc6 sp 00007f20d4bc14f0 error 6 in libcef.so[7f20db858000+7770000] likely on CPU 6 (core 6, socket 0)
https://youtu.be/5R2sv9GCwz0?t=685
https://news.ycombinator.com/item?id=37100760
It's really crude at this point, but I am "close" (who knows, days, weeks or months, those last few issues may contain awesome rabbit holes...) to be able to publish next version that would have
- moving and rotations using vr controllers instead of keyboard which is a bit of pain in the ass
- double rotations
- javascript programmable 4d objects (by player, that is.) letting you to create your own dynamic 4d world where to move in.
If you allow a user to bind a key to a rotation in each dimension, it makes the structure slightly more intuitive
Each vertex of an n-dimensional hypercube represents one of the possible binary numbers of length n, each edge represents a bit flip, and all edges in the same direction represent the same bit flip.
I worked on an image which displays this relationship.[0] Focus on the labeled vertices and see how the edges relate to changes in the binary representation
[0] https://commons.wikimedia.org/wiki/File:Snake_in_the_box.svg
And then there is AK Dewdney's Planiverse.
Both are well worth reading if you haven't seen them before, the Planiverse is more modern and probably more engaging but Flatland is quite interesting as well.
Very powerful little book. Thank you for making this!
Normally, when a being experiences unfamiliarity, it can resolve it, by gaining additional experiences, knowledge, or simply getting accustomed to circumstances. Even if it never does so, it feels that it can.
But with these interactions, the unfamiliarity is caused by something that a 3D being is physically incapable of becoming familiar with. It, quite literally, cannot wrap it's head around what's going on. Thanks to our intellect, we can mathematically explain, even simulate what's going on, but we cannot get accustomed to it.
Bear in mind that this is only my opinion, coming from someone who knows next to nothing about psychology though :-)
I like the S3 geometry, which is essentially floating around on the 3d-surface of a 4d ball, also described here: https://www.mathinees-lacaniennes.net/images/stories/article...
Wouldn't it make more sense enrich clouds of 3D points with new attributes that encode the value in the higher dimensions? e.g. 3 spatial dimensions, with the fourth dimension being color. A fifth dimension could then turn the dots into numbers. Then you have the information from 4 or 5 dimensions encoded into 3D space in a way humans can still understand to some degree.