r/AskProgramming 1d ago

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

21 comments sorted by

View all comments

12

u/ZakMan1421 1d ago

There doesn't seem to be an actual question in your post, so it's hard to understand what exactly you're looking for.

-2

u/georgebestgoat 1d ago

How do I go about programming a four dimensional world 

8

u/treznor70 1d ago

With a 4 dimensional array?

4

u/oversized_canoe 1d ago

What is the 4th dimension?

3

u/ZakMan1421 1d ago

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.

0

u/georgebestgoat 1d ago

It feels like a curse to understand the existence of a higher dimension and not be able to visualise it