POV-Ray : Newsgroups : povray.binaries.images : New tetrahedron splitting in tesselation patch : Re: New tetrahedron splitting in tesselation patch Server Time
19 Aug 2024 02:27:00 EDT (-0400)
  Re: New tetrahedron splitting in tesselation patch  
From: Jérôme Grimbert
Date: 23 Jan 2001 03:10:58
Message: <3A6D3C9F.DF9D7F40@atosorigin.com>
Anton Sherwood wrote:
> 
> Margus Ramst wrote:
> > When I tried something similar, the only way I could figure out how to
> > split the cube was into 5 tetrahedrons (4 with faces coinciding with
> > cube faces, 1 "in the middle"); how did you distribute the 6 ones?
> 
> One way is to start with a diagonal of the cube as an edge common to all
> six.  Is there another?
> 

Yes, the one used initially by Warp (it is in the code, you should have looked)

                TesselateTetrahedron(&info,0,4,2,1,Sm); /* 1 */
                TesselateTetrahedron(&info,6,4,2,1,Sm); /* 2 */
                TesselateTetrahedron(&info,6,3,2,1,Sm); /* 3 */
                TesselateTetrahedron(&info,4,5,6,1,Sm); /* 4 */
                TesselateTetrahedron(&info,5,6,3,1,Sm); /* 5 */
                TesselateTetrahedron(&info,6,3,7,5,Sm); /* 6 */

Assuming you're at -z, looking to +z, left is -x and up is y

1: bottom left corner of the cube in front of you
6: top right corner of the cube away 

union(2,3,4,5) is a slice of the cube  between two parallel planes.

one diagonal of the cube is used as a common segment (from
the left bottom corner away to the top right corner near you).

2: opposite segment is the diagonal of the front face (top left to bottom
right).
3: opposite segment is the top segment on the left face.
4: opposite segment is the bottom segment on the right face.
5: opposite segment is the diagonal of the back face (top left to bottom right)

Hope this help you see the split.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.