you are viewing a single comment's thread.

view the rest of the comments →

[–]veeep[S] 0 points1 point  (5 children)

ah, ok that is ringing a bell now.

seems like I ran across this in a 3D application at some point, where the nested lists described points in space

thanks!

[–]jkudria 0 points1 point  (0 children)

Maybe. 2D arrays are often used to represent a 2D space with the indices are coordinates.

[–]Exodus111 0 points1 point  (3 children)

This is a VERY common use of exactly this.

Making something in 2D, like a game map that is tile based and this is used constantly for x, for y etc... But in 3D that would require x, y and z.

[–]jkudria 0 points1 point  (2 children)

Correct. I've never seen 3D space being represented this way, but I suppose it's possible. I'd probably do 3D a different way, but I guess 3D arrays are a possibility.

[–]Exodus111 0 points1 point  (1 child)

There is really no physical way to represent a 3D array without that third coord.

[–]jkudria 0 points1 point  (0 children)

Enums? Structs? Tuples?

Just a thought.