Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What methods are used to visualize a 4-dimensional Array?

An Array ( a row of elements ):

[ ][ ][ ][ ][ ][ ]

A 2-D Array ( a table ):

[ ][ ][ ][ ][ ][ ]
[ ][ ][ ][ ][ ][ ]
[ ][ ][ ][ ][ ][ ]
[ ][ ][ ][ ][ ][ ]

A 3-D Array:

//Imagine the above table as a cube ( a table with depth )

How does one visualize a 4-D array?

The closest I can come is multiple cubes, so for int[,,,] [5,10,2,7] would be cube 5, row 10, column 2, layer(depth) 7.

I'm not sure if this is the best way to visualize a 4-D array, though... and I'm not sure it's the best way to teach it... however it does have the advantage of being extensible ( a row cubes, a table of cubes, a cube of cubes ( 6-d array )

Cubes through time is another way that I can think of it.

Am I on the right track here?

like image 355
Armstrongest Avatar asked May 14 '10 14:05

Armstrongest


People also ask

How do you visualize 4 dimensional data?

Visualize 4-D Data with Multiple Plots You can use the plotmatrix function to create an n by n matrix of plots to see the pair-wise relationships between the variables. The plotmatrix function returns two outputs. The first output is a matrix of the line objects used in the scatter plots.

Can you visualize 4D?

Some believe that it is impossible for us to visualize 4D, since we are confined to 3D and therefore cannot directly experience it. However, it is possible to develop a good idea of what 4D objects look like: the key lies in the fact that to see N dimensions, one only needs an (N-1)-dimensional retina.

What are 4 dimensional arrays?

Prerequisite :Array in C/C++, More on array A four-dimensional (4D) array is an array of array of arrays of arrays or in other words 4D array is a array of 3D array. More dimensions in an array means more data be held, but also means greater difficulty in managing and understanding arrays.

What are 4 dimensional arrays used for?

A practical use of a 4D array is to keep track of a 3d object, could keep track of [x-cord][y-cord][z-cord][time]. This 4D array would be a useful use of a 4D array. This could keep track of a range of cords and time, and the value in the array could say the speed of of the object.


2 Answers

If you're trying to display output of a program for end users, then you are on the right track.

If you're trying to teach it, I'd briefly use that method, and then I'd go into depth explaining how the computer keeps them all in contiguous memory -- http://www.plantation-productions.com/Webster/www.artofasm.com/Windows/HTML/Arraysa2.html. I think this is the best way to understand it.


The original link is no longer working, but I found it up on the Internet Archive here -- http://web.archive.org/web/20120410120743/http://webster.cs.ucr.edu/AoA/Windows/HTML/Arraysa2.html


Updated first paragraph to show updated link, thanks to @OskensoKashi.

like image 192
Nate Avatar answered Feb 24 '23 10:02

Nate


That's how I would teach it: a row of cubes. The position (or cube number) on this row is the 4th dimension.

And if you want 5-dimensions, now picture columns and rows - of cubes!

For 6 dimensions, picture the rows and columns of cubes (as for 5 dimensions), and now add "layers" of these rows and columns.

...For 7 dimensions, imagine all of the above - contained in cubes in a single row! ;)

Yup, it's cubes all the way down.

like image 34
FrustratedWithFormsDesigner Avatar answered Feb 24 '23 09:02

FrustratedWithFormsDesigner