Fitting a Tetrahedron into a Sphere

This topic is 5393 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I'm not too sure if this would be the forum to ask this in but I've been bashing my head against a wall over this problem for the past 3 days. Does anyone know of a method of computing the 4 vertices needed for the tetrahedron so that these vertices lie on a unit sphere? I've been attempting to code a 3-d version of the koch snowflake, but have ran into a small snag on this part. I'm pretty sure the rest of my algorithm works, I just need to figure out how to get these first 4 points. Any help at all would be greatly appreciated.

Share on other sites
Sounds like you already have a tetrahedron, just not 'unit-sphereized'? If so just normalize your verts -> instant unit sphere.

Share on other sites
what you need to do is put two vertices on two peripendicular axis each, spaced a certain amount along the third axis.

can you picture that? in code it would be something like this:

addvertex( a, 0, b);addvertex(-a, 0, b);addvertex( 0, a,-b);addvertex( 0,-a,-b);

the keyis finding a and b.

we know that a*a+b*b should be 1
also, all edgelengths should be equal, so 4*a*a = 2*a*a + 4*b*b

two equations, two unknown, yay. maybe there slipped an error in the last equation, but you get the idea.

Share on other sites
(since im bored..)

which would mean b = sqrt(1/3), hence a = sqrt(2/3)

plausible.

Share on other sites
Thanks, I got it working now. I really appreciate all the help.

• 18
• 29
• 11
• 21
• 16