Triangular/Hexagonal lattice operations, by simple arithmetic on coordinates, where the axes are at 60 degrees.

a Full color 3D image of what I am trying to manipulate. To maintain the relationship between the individual objects (and colour them correctly) it is important to work in lattice coordinates rather than x,y coordinates.
Operation:            
antiClockwise rotation about (0,0) b' = a+b
a' = -b
Clockwise rotation about (0,0) a' = a+b
b' = -a
Mirror image about B=0 a' = a+b
b' = -b
Mirror image about A=0 b' = a+b
a' = -a
Mirror image about A=-B a' = -b
b' = -a
Mirror image about A=B (30 deg) b' = a
a' = b
Mirror image about A=-B/2 (90 deg) a' = -(a + b)
b' = b
Mirror image about A=-2*B (150 deg) a' = a
b' = -(a + b)
There are several approaches that allow one to explain why this works. Several of these were highlighted on the maths Wiki, using: In the end, all of these were too highlevel for me, and none exposed every underlying assumption.
So, I decided to go back to basics, and explain the coordinate system using basic algebra, trig and geometry.

Trig/algebraic explanation of why rotation by 60deg works: (Note, a geometric explanation is far shorter....)
Shortcuts:
let p = cos(60) (and p = 1/2)
let q = sin(60)

p.p +q.q = 1

Standard rotation formulae
(through 60 degrees):
x' = x.cos(60) - y.sin(60)
y' = x.sin(60) + y.cos(60)
therefore:
x' = x.p - y.q
y' = x.q + y.p

Derived from the diagram:
x = a + b.cos(60)
x = a + b.p
y = b.sin(60)
y = b.q

and inverse formulae
a = x - b.p (and a' = x' - b'.p)
b = y/q (and b' = y'/q)

Proof of anticlockwise rotation:
b' = y'/p
b' = (x.q + y.p)/q
b' = ((a + b.p).q + b.q.p)/q
b' = q.(a + b.p +b.p)/q
b' = a + 2p.b
but p=1/2 , therefore
b' = a + b

a' = x - b'.p
a' = x.p - y.q - (a+b).p
a' = (a + b.p).p - y.q - (a+b).p
a' = a.p + b.p.p - y.q - a.p + b.p
a' = a.p + b.p.p - b.q.q - a.p + b.p
a' = b.(p.p - q.q - p)
But q.q = 1 - p.p, therefore
a' = b.(p.p - (1 - p.p) - p)
but p=1/2 , therefore
a' = b.(1/4 - 1 + 1/4 - 1/2)
a' = -b

 
Lattice reflection formulae, derived geometrically. The circled point is a sample point of interest. The blue line is the line of reflection, and the yellow and green lines are there to give an indication of how the formulae are derived.

Since I have treated this as a set of explanations rather that a set of proofs, I have left out all the individual steps, and relied on your understanding of parallel lines and equilateral triangles.
Mirror image about B=0

a' = a + b
b' = -b
Mirror image about A=0

a' = -a
b' = a + b
Mirror image about A=-B

a' = -b
b' = -a
Mirror image about A=B (30 deg)

a' = b
b' = a
Mirror image about A=-B/2 (90 deg)

a' = -(a + b)
b' = b
Mirror image about A=-2*B (150 deg)

a' = a
b' = -(a + b)

Structure in three dimensions




Apart from the degenerate case at A, (where m=0 and n=0) all the triangular faces that are normal to an axis of rotation, can be described as as an equilateral triangle of side length n, where for all m in 0,1,2,3,4,5 : n=3m , n=3m+1, n=3m+2, , n=3(m+1) .......
n=0 , n=1 , n=2 and n=3 can be seen from left to right (A....B)

For all n > 3 , the plane can be described as containing a core triangle of size 1 2 or 3 and 1 or more triangles that drawn outside it. Thus, provided you can describe how to rotate the core triangle, you can describe how to rotate the whole triangle.

The core solid that best describes the lattice in 3D, is the Cuboctahedron. References:



Top view (of C=0 plane) and panorama view of the triangle faces (as at 3 units from the centre).

Because of symmetry, we only have to look at the first three axes throughthe triangular faces, and then we can use clockwise / anticlockwise rotations instead:

Panorama view of the triangle faces (as at 6 units from the centre).

Dave dot Joubert , googlemail