The ‘plane[4]’ is the coefficients a,b,c,d for the
equation of a plane. It is important to understand that the first three components a,b,c of plane[4] are the normal, so on line 664 it is possible to say normal = plane
.
LInes 600 to 630 get the plane (and wplane, which is the plane after the actor transformation from ‘data’ coords to ‘world’ coords). The plane is oriented so that the normal points towards the ‘camera’ (this means it points out of the computer screen, not into the computer screen).
Lines 631 to 642 do exactly what the comment says: find the largest component of the normal. This checks whether the normal is closest to the x, the y, or the z axis.
For your original question, I think it is most important to understand how ‘v1’ and ‘v2’ are computed. Compare this to the simpler (much less general) answer I gave to Post 1391, which computes the matrix only for a rotation around the Z axis: