Go Down

Topic: 3D look up tables possible? (Read 742 times) previous topic - next topic

jtw11

I have a need at the moment for a variable that is looked up from a 3D table, I can't say I know about how to use arrays - so I'm not sure if using arrays is the way to go about it, or if indeed a 3 dimensional array is possible.

How would I go about creating and using a lookup table? Size wise, I'm hoping to be able to use a table with a size of roughly 10 x 20.

Furthermore, these values will need to be interpolated between table cells - but we'll deal with that later...

Thanks in advance!

AWOL

Quote
Size wise, I'm hoping to be able to use a table with a size of roughly 10 x 20.

That's 2D
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Nick Gammon


I can't say I know about how to use arrays ...


You could Google "c++ array table".

I found around 23,000,000 hits. The first pageful was about multi-dimensional arrays.

jtw11


Quote
Size wise, I'm hoping to be able to use a table with a size of roughly 10 x 20.

That's 2D


Of course! I was thinking of the values in the table as being the "third" dimension... No wonder all the 3D info I've looked at seems to be over complicated so far.

dhenry

You can have as many dimensions as you want. End of the day, they are represented as a linearly addressed array.

So all it takes is for you to decide how you want to store / address the data, and retrieve accordingly.

Go Up