A: 

One possibility:

  1. Generate four (non-orthoganal) 3-vectors, \vec{v}_i from the center of the tetrahedron toward each vertex.
  2. For each four position x = (x_1 .. x_4) form the vector sum \Sum_i x_i*\vec{v}_i.

Of course this mapping is not unique in general, but you condition that the x_i's sum to 1 constrains things.

dmckee
care to venture a guess how to get coordinates of 4 vectors from the center of the tetrahedron towards each vertex? ;)
Yaroslav Bulatov
+3  A: 

You want

   (1,0,0,0) -> (0,0,0)
   (0,1,0,0) -> (1,0,0)
   (0,0,1,0) -> (1/2,sqrt(3)/2,0)
   (0,0,0,1) -> (1/2,sqrt(3)/6,sqrt(6)/3))

And it is a linear transformation so you transform

   (x,y,z,w) - > (y + 1/2 * (z + w), sqrt(3) * (z / 2 + w / 6), sqrt(6) * w / 3)

Edit You want the center at the origin -- just subtract the average of the four points. Sorry

(1/2, sqrt(3)/6, sqrt(6) / 12)
deinst
Nice...mind saying how you got it so fast?
Yaroslav Bulatov
Practice. There is half a page of scrawled drawings of triangles etc. The only tricky part is the height of the tetrahedron, and once you get the center of the base, it is just algebra.
deinst