# Deduce dice configuration knowing 2 adjacent faces

Let's say I have a die. I know it's up face and right face. I'd like to know what's on other faces, in this configuration.

I know the dice configuration:

  0
3 1 2
5


where $1$ is on the front face and $4$ is at the back (not visible).

On $2$ opposite faces, the sum of values is $5$ ($2-3$, $0-5$, $1-4$).

Basically, I would like to find a function f(x, y):

f(0, 1) = 3    f(1, 0) = 2
f(0, 2) = 1    f(2, 0) = 4
f(0, 3) = 4    f(3, 0) = 1
f(0, 4) = 2    f(4, 0) = 3

f(1, 2) = 5    f(2, 1) = 0
f(1, 3) = 0    f(3, 1) = 5
f(1, 5) = 3    f(5, 1) = 2

f(2, 4) = 5    f(4, 2) = 0
f(2, 5) = 1    f(5, 2) = 4

f(3, 4) = 0    f(4, 3) = 5
f(3, 5) = 4    f(5, 3) = 1

f(4, 5) = 2    f(5, 4) = 3


Is there a simple and elegant math formula for this function?

-

Let $g$ be the identification \begin{align} g(0) = (1,0,0) &\quad g(5) = (-1,0,0) \\ g(1) = (0,1,0) &\quad g(4) = (0,-1,0) \\ g(2) = (0,0,1) &\quad g(3) = (0,0,-1). \end{align} Then $f$ is given by $$f(m,n) = g^{-1}( g(n)\times g(m) ) ,$$ so under the identifications given by $g$ your map is just the vector product (in reverse order because of an unfortunate difference in convention between the vector product and what you want your map to be). Is this elegant enough?