Jump to content
  • Advertisement
Sign in to follow this  
flxuraz

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.

If you intended to correct an error in the post then please contact us.

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 this post


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

Share this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!