POV-Ray : Newsgroups : povray.general : Constructing a solid tetrahedron by 4 triangles : Re: Constructing a solid tetrahedron by 4 triangles Server Time
30 Jul 2024 12:27:46 EDT (-0400)
  Re: Constructing a solid tetrahedron by 4 triangles  
From: m a r c
Date: 5 Feb 2009 09:55:43
Message: <498afdef@news.povray.org>

web.498adf1b1f5de9ab792c7d270@news.povray.org...
> Hi friends, I wanna make a solid tetrahedron using 4 triangles. I am using 
> the
> following code, but the object's inside is empty (I noticed it, when I 
> used
> difference command to subtract 4 spheres from the tetrahedron.
>
You should arrange your triangles as a mesh instead a union.
then put a inside_vector after triangle definitions this way

Marc

difference{

 object{
  mesh {
   triangle { < 1,  1,  1>,  <-1,  1, -1>,  < 1, -1, -1> }
   triangle { <-1,  1, -1>,  <-1, -1,  1>,  < 1, -1, -1> }
   triangle { < 1,  1,  1>,  < 1, -1, -1>,  <-1, -1,  1> }
   triangle { < 1,  1,  1>,  <-1, -1,  1>,  <-1,  1, -1> }
 inside_vector z
  }

  pigment{ color rgb<1,0,0> }

 }


 sphere { < 1,  1,  1> , d}
 sphere { <1,  -1, -1> ,  d}
 sphere {  < -1,  1,  -1> ,  d}
 sphere { <  -1,  -1,  1> ,  d}

}


Post a reply to this message

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