Directional set up for a quad element is as follows: 3 +-----+-----+ | | | | 0 | 3 | 0 |_____|_____| 2 | | | | 1 | 2 | | | | +-----+-----+ 1 Vertex numbers match with quadrant numbers. So the midpoint of side 0 (west) will be vertex 1 of quadrant 0, or vertex 0 of quadrant 1. The opposite direction of a direction i is (i + 2) % 4. The setup for triangular quaternary subdivisions is as follows: /\ / \ / 0 \ 0 /______\ 2 /\ /\ / \ 3 / \ / 1 \ / 2 \ /______\/______\ 1 A subtlety here is that the centre triangle is a rotated version of the original. Moreover, all the neighbouring triangles of any given triangle are of a different rotational persuasion, which leads to the surprising result that the opposite of any particular direction is itself. (Think about it!) Also, child 3's neighbours are all internal to the local subdivision.