Changing from one basis set to another is easy — multiply by a matrix. When the basis sets differ by just one vector I get confused, if we are to exploit the faster arithmetic. Here is some simple algebra that unconfused me.
In 3D we have two basis sets: {X, Y, A} and {X, Y, B}.
Note the symmetry.
We can express A in the 2nd set and B in the 1st set thus:
A = axX + ayY + abB
B = bxX + byY + baA
Substituting our expression for B into the expression for A yields:
A = axX + ayY + ab(bxX + byY + baA)
A = (ax + abbx)X + (ay + abby)Y + (abba)A
0 = (ax + abbx)X + (ay + abby)Y + (abba − 1)A
Since {X, Y, A} is a basis the coefficients in parens in this last equation must all be 0.
We thus learn:
ab = 1/ba
ax = − abbx
ay = − abby
In routine cvz2f we have the natural normal to the facet already expressed in zone bcc coordinates as ufn.(k).
ufn.(k) plays the role of B above—we have expressed B and the natural normal in the other basis.
To express zone basis element k in facet coordinates, is like expressing A in basis {X, Y, B}.
a = 1. /. w.(k) acts as “ab = 1/ba”.