0
Is it possible to somehow simulate or implement higher dimensions (more than 3 dimensions) using a programming language?
If it is possible can someone please provide some idea that how it can be implemented?
5 odpowiedzi
+ 1
we sure can make more than just 2 or 3 dimensional arrays, for example a 4 dimensional array; to explain it easily it’s a 1-dimensional array containing 3 dimensional elements so to speak, each row contains a 3 dimensional array (this is the easiest I can explain), for a 5 dimensional array, same counts but it’s a 2-dimensional array that has 3 dimensional arrays inside it, so each row, col contains 3 dimensional arrays.
here’s an example of a 4 dimensional array in c#:
https://onlinegdb.com/SJ2A3RRBE
Although I cannot think of any application of it.
hope this helps!
+ 1
Like a tesseract? It's kinda mind boggling but amazing at the same time. And obviously yes, you can create one by yourself.
+ 1
it’s hard to visualise something which does not exist, i tried to explain it as best as I could but a tesseract, no, this is how we visualise it in the human world, a computer doesn’t behave in the same way.
+ 1
Joery De Loose, thanks for your answer, you said right that multi dimensional arrays are not necessarily practical to apply anywhere because we live in a 3 dimensional world, but they could be useful designs or models to store lesser dimensions .
For example- we might make a model of an animation. An animation consists of time varying images or frames, i.e. an array of images.
Each image is a 2 dimensional array and each element of array may represent a color.
Furthermore a color might have multiple components ,like- blue, red, green, black and white.
0
for this we can already use jagged arrays which is an array of arrays which should in practise be better.