Bitwise functions 3d geometry