Having found a really neat way of enumerating all surtopes of n-cubes and n-crosses using the base 3 expansion of 1...3<sup>n</sup>, I turned my attention to generating the n-simplex.
Unfortunately, this isn't as simple as it may sound (ha!). Although the tetrahedron has a special relationship with the cube, and therefore has completely integral coordinates, this only happens in a select few dimensions (and 4, 5, 6 dimensions are not included, although 7 and 8 are). For example, in 2D, the triangle does not have any obvious relationship with the square, and AFAIK can't have all integral coordinates.
Now, generating the face lattice of an n-simplex turns out to have a neat solution: the Hasse diagram of an n-simplex is isomorphic to the edge structure of an (n+1)-cube (see previous thread here... this was sometime early this year or late last year, I believe). So we can simply generate the edges of an (n+1)-cube, which is very easy, and we have the simplex's face lattice.
The tricky part is generating vertex coordinates so that you get an origin-centered, regular n-simplex. Here's one way to do it:
Define the vertices of the 1-simplex to be (-1) and (1). Let P<sub>1</sub>=1.
For each n>1, we take the vertices of the (n-1)-simplex and append -Q<sub>n</sub> as its n'th coordinate, and add a point (0,0,0,...,P<sub>n</sub>) as the new vertex, where P<sub>n</sub> = 2/sqrt(4-P<sub>n-1</sub><sup>2</sup>), and Q<sub>n</sub> = sqrt(4-P<sub>n-1</sub><sup>2</sup>)-P<sub>n</sub>.
It's left as an exercise for the reader that the resulting coordinates defines an origin-centered regular n-simplex.
The interesting recurrence P<sub>n</sub> converges to 1.1939365665... as n approaches infinity. The question is, is there a closed algebraic expression that defines P<sub>n</sub>? Does the limiting number 1.1939365665... have a closed algebraic expression? (Is it transcendental?)
Note: I corrected the definitions of P and Q, which were missing a square
Note(2): apparently I calculated the limit of P<sub>n</sub> using the old (wrong) definition of P and Q, so the limiting number is wrong. The real limiting number should be sqrt(2).
Note(3): I changed the title 'cos the number is wrong, so the old title is irrelevant now.