Complete list of regular shapes

N(n,m)
the number of m-dimensional parts of this n-dimensional shape

N(n,m) = 0, for all m>n
since a n dimensional object cannot contain higher sub-parts

N(n,m) = 1, for all m=n
since a n dimensional object contains only itself as n-dim sub-part

dimension common name
0 point
1 line
2 plane
3 space
4 hyperspace

R0(k): only 2-dimensional

k is the sub-type
for k>=3
N[k](2,0)=k points
N[k](2,1)=k lines
k common name
3 triangle
4 square
5 pentagon
6 hexagon

R1(n)

N(n,m) = binom(n+1, m+1)
mn0  1  2  3  4  5
0 1  2  3  4  5  6    n+1
1 0  1  3  6 10 15    (n+1)*n/2
2 0  0  1  4 10 20    (n+1)*n*(n-1)/6
3 0  0  0  1  5 15
4 0  0  0  0  1  6
5 0  0  0  0  0  1

to get the R1(n) object, add a new point on a line perpendicular to the R1(n-1) object, connect the new point to all points in the R1(n-1) object.
k common name
0 dot
1 line
2 triangle
3 tetraeder
4 pentahedroide

R2(n) - octa-oids

N(n,m) = 2^(m+1) * binom(n, m+1)
mn0  1  2  3  4  5
0 1  2  4  6  8 10   2^(n+1)*n
1 0  1  4 12 24 40   2^(n)*n*(n-1)/2
2 0  0  1  8 32 80   2^(n)*n*(n-1)*(n-2)/3
3 0  0  0  1 16 80   2^(n-2)*n*(n-1)*(n-2)*(n-3)/3
4 0  0  0  0  1 32   2^(n+1)*n!/(n-5)!/120
5 0  0  0  0  0  1

I have not though about this one good enough, but I think it goes like this:
to get the R2(n) object, take a R2(n-1) object, add points on both sides of the R2(n-1) object, on a line perpendicular to the R2(n-1) object.
k common name
2 square
3 octaeder
4 16-cell

R3(n) - cubes

N(n,m) = 2^(n-m) * binom(n,m)
mn0  1  2  3  4  5
0 1  2  4  8 16 32     2^n
1 0  1  4 12 32 80     2^(n-1)*n
2 0  0  1  6 24 80     2^(n-3)*n*(n-1)
3 0  0  0  1  8 40     2^(n-4)*n*(n-1)*(n-2)/3
4 0  0  0  0  1 10     2^(n-4)*n!/4!/(n-4)!
5 0  0  0  0  0  1

to get the R3(n) object, take a R3(n-1) object, translate it on a line perpendicular to itself, connect all points in the translated object to the corresponding points in the original object.
k common name
0 dot
1 line
2 square
3 cube
4 hyper-cube

type#4 - the special shapes

these shapes have no counterparts in other dimensions
dimension N(n,n-1) (n-1)-shape common name
3 12 pentagon dodecaeder
3 20 triangle icosaeder
4 12 octaeder 24-cel
4 120 dodecaeder120-cel
4 600 tetraeder 600-cel

binom(n,m) = the binomial coeficient

generating polytopes

i wrote a perl script that generates most polytopes, and can print them as a hierarchy of points->lines->faces->cells-> etc.

download

the script, genshapes2.pl, can be downloaded here.

algorithm

not all shapes have a very optimal generation algorithm yet. nor have i written an algorithm for all shapes yet. but most are done, this diagram shows what items are generated ( optimal with respect to nr of objects tested ) or bruteforced ( trying all combinations, not just the ones nescesary )
         0   1   2   3   4   5   6  ..  n-1  n <-- subdim
  tet :  h   ggggggggggggggggggggggggggggg   1
  cub :  h   ggggggggggggggggggggggggggggg   1
  oct :  h   g   b   b   xxxxxxxxxxxxxxxxx   1
  dod :  h   b   h   1   -----------------
  ico :  h   b   b   1   -----------------
  c24 :  h   b   b   x   1   -------------
  c12 :  h   b   x   x   1   -------------
  c6c :  h   b   b   x   1   -------------
    
  b : bruteforced  ( 1:floatequal, 2:'testlines', ... )
  h : hardcoded
  x : not yet implemented
  g : generated

links