working with simulated 2 and 3 dimensonal space
simple question. if i wanted to simulate a 3d volume (not talking about displaying it as a picture, just simulating) , would the proper way to do this be through a 3d array as in
Code:
object_1=bigarray [x][y][z];
object_2=bigarray[a][b][c];
if (object_1==object_2){
cout<<”aaaaahhhhhhhhhhh! colision! we're all gonna die!"
}
okay, i understand that theat wasn't exactly the best code for what i'm talking about, but the concept remains; is this kind of array good for handling, say a simulation of particles like in the dust toy, or is there some concept that i havent gotten to yet that would better handle this kind of problem, and perhaps use less memory than this?
if i havent made myself clear enough, feel free to tell me and i'll try to elaborate, but trolls be warned!