Jump to content
• Advertisement

# tesselating a tetrahedron

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

Tesselating a tetraheron and pushing the vertices out to unit length won't give me regular triangles. I tesselate by dividing all edges and creating 4 faces. Since the distances from the origin to the original vertices and the distances to the centers of the edges are all the same i think my sphere should end up with uniform sized faces. I use the tetrahedron because i want all triangles set up like this:
v0 .. v2 = verts
e0 .. e2 = edges

v2      .
/\      .
e2  e1    .
/    \    .
v0--e0--v1  .

and i want edge i on a face neighbouring edge i on it's neighbours face... this is an unfolded tetrahedron. You can see this works on a tetrahedron keeping all faces counterclockwise:
__0_____0___   .
\    /\    /   .
1  2  1  2    .
\/_0__\/     .
\    /      .
1  2       .
\/        .

The problem is that a tetrahedron doesn't return a regular sphere (OR DOES IT?) I haven't found another regular shape to tesselate that obeys the above rules. Please comment, thanx! Marty

#### Share this post

##### Share on other sites
Advertisement
I think that should work, assuming the initial vertices are already at unit distance from the origin.

Another shape that will work is an icosahedron (better known as "twenty-sided die").

#### Share this post

##### Share on other sites
Quote:
 Tesselating a tetraheron and pushing the vertices out to unit length won't give me regular triangles. I tesselate by dividing all edges and creating 4 faces.

i don't quite get what you want to do. What you mean by "regular triangles"? Equilateral triangles?

Quote:
 Since the distances from the origin to the original vertices and the distances to the centers of the edges are all the same i think my sphere should end up with uniform sized faces.

Where origin is? in center of tetrahedron?
What mean "sized"? Have equal area? "the distances to the centers of the edges" from what?
Do you set your vetrices after tesselation to be unit-length?

If you'll tesselate tetrahedron and then set all vertice vectors to be unit length, i'm almost sure you'll get a polyhedra that will have 4 bigger equilateral triangles and 12 smaller non-equilateral triangles, 16 triangles total.

What rules you want it to obey?

anyway, if you want to make polyhedron with vertices placed at equal distances from center, and composed of equal triangles, you can try
1:icosahedron, it have 20 equal faces(more than your 16-face polyhedra), and all edges is equal too, it'e regular polyhedron.

2:dodecahedron with additional vertice at center of each face, so each face is splitten into 5 triangles. Center vertices must be renormalized. So you'll have 60 equal triangles.(it will be slightly non-equilateral triangles)
edit: if by above rules you mean that thing about face edges, that 60-face thing made from dodecahedron probably will not work.

#### Share this post

##### Share on other sites
If you start with a regular tetrahedron, each of the four faces is an equilateral triangle like this:
____________ .\ / . \ / . \ / . \ / . \ / . \/ .[/codeIf I understand correctly, you want to subdivide the four faces each into four smaller equilateral triangles, like this:____________ .\ /\ / . \ / \ / . \/____\/ . \ / . \ / . \/ .[/codeAnd the problem is that when you blow out the new vertices that bisect each of the edges of the original triangle, your new sub-triangles aren't all the same size. This is inevitable. The middle face will always be bigger because you're moving apart all three of its vertices, but the corner triangles only are only having two of their vertices moved apart. (By moving apart, I mean moving out to lie on the surface of the sphere on which the original four vertices lie, which also lengthens the distance between them in the direction of the line connecting them).If you want completely regular, equal angle and equal length sided faces, you need to use a Platonic solid (such as the regular tetrahedron or icosahedron). But you can't keep adding more faces by subdividing the existing ones if you want to keep all faces equal shape and size. 
 0 
 Share this post Link to post Share on other sites 
 
 
 Geoff the Medio    220 Geoff the Medio Member 220 Posted October 11, 2004 ... previous was me.If you start with a regular tetrahedron, each of the four faces is an equilateral triangle like this:____________ .\ / . \ / . \ / . \ / . \ / . \/ .If I understand correctly, you want to subdivide the four faces each into four smaller equilateral triangles, like this:____________ .\ /\ / . \ / \ / . \/____\/ . \ / . \ / . \/ .And the problem is that when you blow out the new vertices that bisect each of the edges of the original triangle, your new sub-triangles aren't all the same size. This is inevitable. The middle face will always be bigger because you're moving apart all three of its vertices, but the corner triangles only are only having two of their vertices moved apart. (By moving apart, I mean moving out to lie on the surface of the sphere on which the original four vertices lie, which also lengthens the distance between them in the direction of the line connecting them).If you want completely regular, equal angle and equal length sided faces, you need to use a Platonic solid (such as the regular tetrahedron or icosahedron). But you can't keep adding more faces by subdividing the existing ones if you want to keep all faces equal shape and size. 0 Share this post Link to post Share on other sites Marty666    145 Marty666 Member 145 Posted October 12, 2004 Hi.* Equal sized triangles = equal area on triangles.* Normalisation is not a problem. * The origin is set up that all the vertices are at unit vectors from the origin. The origin is in the center of the tetrahedron and the tetrahedron has equal edges.When tesselating an octahedron this way the faces look to be having the same size (same area). The sphere is nicely round (all vertices are normalized). I did this, but an octahedron is impossible to build obeying the following rules:NEIGHBOUR RULE:This->Neighbour[At_edge_0]->Neighbour[At_Edge_0] = ThisThis->Neighbour[At_edge_1]->Neighbour[At_Edge_1] = ThisThis->Neighbour[At_edge_2]->Neighbour[At_Edge_2] = ThisRead the above again, the pointer to heighbour of the neighbour returns the face we started in. (see drawing in first post)EDGE RULE:The edges are defined as:edge0 = vert 0..1edge1 = vert 1..2edge2 = vert 2..0so vertices 0, 1, 2 are a counterclockwise triangle which is the same as edges 0, 1, 2 (the order 0, 1, 2 is important!) 2 . / \ . / \ . 2 1 . / \ . 0____0____1 .PRESERVATION OF NEIGHBOUR AND EDGE RULE AFTER TESSELATION: . /\ . 2 1 . /_0__\ . /\ /\ . 2 1 2 1 . /_0__\/_0__\ .THE PROBLEM:This is impossible with any platonic solid i tried so far (i have these dice, so i could try out with them) exept for the tetrahedron (see unfolded tetrahedron in first post). Only the tetrahedron gives (as the anonymous poster explained) irregular triangles (not all edges are the same size and the area is not equal for al the newly created faces after normalisation).My octahedron gives nice results tesselating this way, but has counterclockwise and clockwise triangles to obey the NEIGHBOUR RULE, which violates the EDGE RULE. THE QUESTION:Is there a way to start with a solid that will obey both rules and creates triangles which have equal edges and equal areas?Thanx,MartyPS: A twenty sided die cannot obey the NEIGHBOUR RULE... 0 Share this post Link to post Share on other sites Eelco    301 Eelco Member 301 Posted October 12, 2004 i think your neighbor rule is only conserved on primitives with an integer multiple of 3 triangles around each vertex: this only goes with the 4-sided primitive.no subdivision method will create equal triangles, however, you can correct a lot of the distortion either by making the edges springs, and the verts masses and simulate this mass spring system, or some algebraic correction. as a rule of thumb though: the more tris you start with, the more uniform the result will be.also, am i wrong in assuming your edge rule isnt really needed, but merely a convenience? not saying conveniences are a bad thing, certainly since your code can be quite a bit shorter and more elegant with this contraint, but a 4-sided primitive really leaves to be desired... 0 Share this post Link to post Share on other sites Marty666    145 Marty666 Member 145 Posted October 12, 2004 Hi Eelco (and rest),It's not only a convenience (although it really is convenient), it's also to speed up the code. I have a recursive algorithm to find a face that is hit by a beam with a given direction from the origin.It starts with a check which of the first generation faces the line crosses. Then it checks which child is hit, then for the grandchildren, etc. This is a lot faster when my sphere is set up nicely.I created the neighbour pointers to be able to tesselate quickly and still not do any vertexes double. If the neighbour(s) are allready tesselated i can use their vert(s) for the new faces. The code gets really ugly if the neighbours are not set up this way and gets a lot more complicated (unless i store all neighbours edges in every face)Marty 0 Share this post Link to post Share on other sites Dmytry    1151 Dmytry Member 1151 Posted October 12, 2004 well,and how i woulda do it:Use a icosohedron as base shape.Make a sphere out of it by non-recursively tesselating faces(well,you can recursively tesselate but it's needed to be possible to do that w/o recursion), and THEN renormalizing vertices of faces. Let each face have associated surface coordinate system with axises along edges of triangle.Let's call it, say, u,v coordinates . So coordinates of vertices is u=0,v=0;u=1,v=0;v=1,u=0 . So,for example, finding vertices of subdivised face it's simply for(i=0;i<N;i++)for(j=0;j<=i;j++){u=i;v=j; WorldCoordFrom_uvCoords=Corner+u*Edge1+v*Edge2;}(draw it on paper)Algo:Find face of icosohedron that is hit by beam(say,you can do it by finding largest positive dot product of icosohedron face normal and beam. It's enough to do 10 normals(symmetry) and find smallest negative dot product as well and then select one that have larger absolute value. You can avoid checking unnecessary normals using sign of x, y , and z components of the vectors, or using values of dot products with some normal to find if it needed to check other normals.)Then note that intersection of beam with sphere surface corresponds to intersection of beam with face prior to renormalizing. So find "u,v" coordinates of intersection of beam with icosohedron face. Then find subdivised face it have intersected from "u,v" coordinates, analitically, no recursion needed, no rules needed, no strange simplifications needed.... 0 Share this post Link to post Share on other sites Marty666    145 Marty666 Member 145 Posted October 13, 2004 Ok, this is where my other thread starts... That's where I was still working on an octahedron:http://www.gamedev.net/community/forums/topic.asp?topic_id=272894I get the idear, but I can't figure out a way to tesselate not using a recursive function. With a recursive function the u/v coordinates are messed up.Thanx,MartyPS: Check Dmytry's site, very nice rendered landscape images 0 Share this post Link to post Share on other sites 
 Prev 1 2 3 Next Page 1 of 3   Sign in to follow this   Followers 0 
 Go To Topic Listing Math and Physics googletag.cmd.push(function() { googletag.display('div-gpt-ad-1555502746360-0'); }); Advertisement 
 googletag.cmd.push(function() { googletag.display('div-gpt-ad-1555502640120-0'); }); Advertisement Popular Tags 2D 3D Advice Algorithm C# C++ Concept Design DX11 Feedback Gameplay Godot Graphics Isometric Marketing Mobile Music OpenGL Open Source PC Pixel R&D Unity Unreal VR Popular Now 13 Torque Force Mass Question By CacksStarted Sunday at 04:21 PM 18 R&D State-of-art in real-time software rendering? By DawoodozStarted Thursday at 04:22 PM 29 3D-app Euler-Rotations to UE4 Euler-Rotations By C3D_Started Thursday at 10:29 AM 11 I need my projector to project the WHOLE Starcraft map at once... By StarcraftRoboticsGuyStarted Thursday at 03:59 AM 20 Weird circular orbit problem By cowcowStarted March 5 googletag.cmd.push(function() { googletag.display('div-gpt-ad-1555502515948-0'); }); Advertisement GameDev.net GameDev.net Articles GameDev.net Event Coverage GameDev.net Forums GameDev.net Blogs GameDev.net Gallery GameDev.net News GameDev.net Projects GDNet Chat All Activity Search In Everywhere This Forum This Topic More options... Find results that contain... All of my search term words Any of my search term words Find results in... Content titles and body Content titles only Home Forums Programming Math and Physics tesselating a tetrahedron 
 
 
 × Existing user? Sign In Sign Up Browse Back Articles & Tutorials Back All Categories Audio Business Game Design Industry Programming Visual Arts Columns Back GameDev Unboxed Event Coverage Back All Events Game Developers Conference Power Up Digital Games Conference GameDev.Market Links News Podcasts Back All Podcasts Game Dev Loadout Archive Community Back Beginners Back Beginners Group Beginners Forum Beginners Resources Blogs Calendar Chat Forums Back All Forums Audio Business Game Design Programming Visual Arts Community GameDev Challenges Affiliates Topical Workshops Gallery Groups Back For Beginners GameDev Challenges All Groups Projects Back All Projects Games Game Assets Game Mods Developer Tools Store Forums Back All Forums For Beginners Audio Back Music and Sound FX Games Career Development Business Back Games Career Development Production and Management Games Business and Law Game Design Back Game Design and Theory Writing for Games Programming Back Artificial Intelligence Engines and Middleware General and Gameplay Programming Graphics and GPU Programming Math and Physics Networking and Multiplayer Visual Arts Back 2D and 3D Art Critique and Feedback Community Back GameDev Challenges GDNet Lounge GDNet Comments, Suggestions, and Ideas Coding Horrors Your Announcements Hobby Project Classifieds Indie Showcase Affiliates Back NeHe Productions AngelCode Topical Workshops Careers Back Contractors Hobby Projects Game Jobs Back Browse on GameDev.Jobs Post a Job Members Back Subscriptions Chat Guidelines Leaderboard Online Users Awards Search Back All Activity My Activity Streams Back Latest Topics Featured Blogs Search Important Information By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.   I accept 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! $(document).ready(function() { /* setInterval(function() { //window.googletag.pubads().refresh(); pbjs.que.push(() => { pbjs.setConfig({ bidderTimeout: PBJS_TIMEOUT, useBidCache: true, userSync: { filterSettings: { iframe: { bidders: '*', filter: 'include', }, }, }, }); pbjs.addAdUnits(window.pbjsAdUnits); pbjs.requestBids({ bidsBackHandler: function() { googletag.cmd.push(() => { if (window.pbjs && pbjs.setTargetingForGPTAsync) { pbjs.setTargetingForGPTAsync(); } googletag.pubads().refresh(); }); }, }); }); }, 30000);*/ }); googletag.cmd.push(function() { googletag.display('div-gpt-ad-1555502884201-0'); });$(document).ready(function() { if (ipsSettings.memberID > 0) { ga('send','event','User','Member'); ga('send',{ hitType: 'event', eventCategory: 'User', eventAction: 'Member', eventLabel: ipsSettings.memberID.toString() }); } else { ga('send','event','User','Guest'); } });