Simple rotations in n-dimensions (limited to 'right angle' rotations) Apologies if terminology used here isn't the best.
In 2D, a point $(a, b)$ can be rotated $90^o$ to $(b, -a), (-a, -b), (-b, a)$. So in 2D there are 4 orientations.
In 3D, a point $(a, b, c)$ can be rotated similarly about the z-axis in 4 ways. It can then be rotated $180^o$ about either the $x$ or $y$-axis and then again rotated about the $z$-axis in 4 ways. So there are 8 orientations per plane and since there are 3 planes, there's a total of 24 possible orientations.
All these rotations clearly involve some permutation of $(a, b, c, ...)$ and negation of some of the $x/y/z/...$ values.
Is there some neat/clean methodology to enumerating these orientations in $n$-dimensions? Further, is there some way to quickly determine whether a transformation cannot originate from $90^o$ rotations? For example $(a, -b)$ clearly cannot be from $90^o$ rotations from $(a, b)$.
Context: I'm writing a program in Python to return all these orientations of any given point.
 A: I'll assume for the purposes of this answer that you have selected an orthogonal basis $\{e_1,\ldots,e_n\}$ of an $n$-space,
and you want to find all orientations of this basis that can be reached by sequences of $90$-degree rotations
such that each $90$-degree rotation takes $e_i$ to $\pm e_j$ for some $j$ for each $i.$
That is, the rotation maps the set of axes of the $n$-space to itself.
One such rotation takes $e_j$ to $e_k$ and $e_k$ to $-e_j$ for some $j\neq k$ and leaves every other basis vector unchanged. That is, we swap two basis vectors, and then reverse the direction (change the sign) of one of them.
A sequence of these rotations performs some permutation on the subscripts of the basis vectors while changing some of the signs of the vectors.
Any permutation of the subscripts can be achieved.
The number of sign changes that occur is the same as the number of swaps of two subscripts that are performed in order to achieve the permutation,
but this is not necessarily equal to the number of basis vectors in the final permuted list that are reversed from the direction of an original basis vector, because one sign change can cancel another.
Because the sign changes can only cancel in multiples of two, however, an even permutation will always have an even number of "reversed" basis vectors, and an odd permutation will always have an odd number of "reversed" basis vectors.
Note that the number of sign changes in the final result can be equal to, less than, or greater than the minimum number of subscript swaps required to permute the subscripts, because two consecutive rotations can take
$e_j$ to $-e_j$ and $e_k$ to $-e_k$ while leaving all other basis vectors unchanged; this is a $180$-degree rotation.
So we can replicate the result of any such sequence of rotations by permuting the basis vectors and then reversing some of them.
Any permutation is possible, and the signs of the first $n-1$ basis vectors can be assigned in any way we like,
but the sign of the last basis vector is determined by the parity of the permutation and the parity of the number of sign changes in the other basis vectors. There are no other constraints on the transformation;
to achieve any such configuration we swap subscripts (along with sign changes) until the desired permutation of subscripts is achieved, and then change signs of pairs of basis vectors until all vectors have the desired signs. In this way we can achieve
$$
2^{n-1} n!
$$
possible orientations.
It is not possible for there to be more, because we need each basis vector $e_j$ to be mapped in the end to either $\pm e_k$ for some $k,$
which restricts us to $2^n n!$ possible combinations of permutations and sign changes, of which exactly half are reflections of the $2^{n-1} n!$
transformations we have already counted and are therefore unreachable.
A: The approach  compatible with  David's procedure which takes into account position of $\pm1$ in a column (the other entries in the column are zeros) of rotation matrix.
In first column we have $2n$ possibilities, in the second $2(n-1)$ of remaining choices, in the third $2(n-2)$ etc.. in the last we have theoretically $2$ choices, but only one would give determinant $=1$.
Hence the number of possible orientations $2^{n-1}n ! \ \ $.
