Tri(cubic?)-interpolation on finite sets [closed]

I have two sets of data of same size, representing binded triplets, we can represent these two sets like this:

$$\mathbb{N}_A=\{i \in\mathbb{N}\mid i\in [0;256[\; \mid i \equiv 0\, [8]\}$$

$$\mathbb{N}_B=\{i \in\mathbb{N}\mid i\in [0;256[\, \}$$

$$f(\mathbb{N}{_{A}}^{3})=\mathbb{N}{_{B}}^{3}$$

For example:

(8;8;32) -> (5;7;43)

(8;0;40) -> (5;41;58)

(16;8;48) -> (5;41;58)

(8;24;48) -> (16;48;255)

I need to interpolate these two sets of values of mine in order to be able to say, for any triplet in $$\mathbb{N}{_{A}}^{3}$$, what is the corresponding triplet in $$\mathbb{N}{_{B}}^{3}$$.

Usually in IT (I ain't not mathematician) it's cool because nearly all 1-2-3dimensional problem can easily be generalized to any higher dimension and help us solve really abstract (and hardly understandable for humans) problems. But as a human not so familiar with math, it's hard for me to entirely visualize my problem. I'd tend to say $$f(\mathbb{R^n})=\mathbb{R^n}$$ needs $$n+1$$ dimensions to be drawn, so in my case it's an hypercube, to a bunch of points in cube we bind another bunch of points in the (same?) cube, but I'm pretty sure I'm wrong assuming this. Maybe the restrictions on $$\mathbb{N}$$ are useless but if I have to build my own algorithm later I prefered to write them there too, just in case you find them useful. Because even if I manage to find a tool for tri-interpolation, chances to find one accepting restrictions are really slim, I think, even though I'm pretty sure it changes a lot of things to have a finite set for interpolation, and maybe there's even a better way than interpolation for finite sets?

If you are interested in why I'm trying to achieve this (and maybe this could help you helping me), it's because I have two versions of a game, an old one where images were encoded in 5 bits (so 15 bits) and a newer one were images were encoded in 8 bits (so 24 bits), and I'm trying to guess the rule (even though there was no "rule") guys used to "restore" the old game, so I can apply this "rule" (my function $$f$$) to any 5-bits-colors game to restore it keeping the style used from old game to recent game (and yes I know if this was used in some game it may not fit in another and that's right, but my goal is to apply the rule to parts of the old game that haven't got a restored version, so I can know what they would look like if people working on the newer game would have restored them as well).

Hope I was clear, I'm still looking around tri-cubic interpolation, but all I'm kind of sure is the tri part but for the cubic I'm not sure, how can I know? In 1-dimensional functions it's more trivial to guess the "form" of the function, but in 3D I have no clue...

closed as off-topic by YCor, kodlu, RP_, Yemon Choi, Gabriel C. Drummond-ColeNov 10 at 23:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question does not appear to be about research level mathematics within the scope defined in the help center." – YCor, kodlu, RP_, Gabriel C. Drummond-Cole
If this question can be reworded to fit the rules in the help center, please edit the question.