r/AskProgramming • u/georgebestgoat • Sep 12 '26
Programming in four dimensions
I've never seen any discussion on this, but I really want to try it. It is very difficult to imagine four dimensions in a 3 dimensional world, but the mathematics of it works out and it can be visualised. I never see anyone attempt to make a game in four dimensions for example. I just don't know where to start. It's a subject of which there are few pioneers
0
Upvotes
View all comments
Show parent comment
3
u/ZakMan1421 Sep 12 '26
I assume in reference to a game?
It kind of depends how accurate you want to be. The best way to think about how something from a fourth dimension looks in three dimensions is to think about how something from three dimensions looks in two dimensions.
For example, if you have a 3D ball and move it through a plane, from the 2D perspective of the plane, you would see a circle appear and grow to the radius of the ball, then shrink away. This is because you can only see a slice of the ball. Similarly, a 4D ball moving through a 3D space would look like a ball appearing out of no where, growing to the radius of the 4D ball, then shrinking away until you can no longer observe it in your 3D space.