POV-Ray : Newsgroups : povray.advanced-users : Tetrahedron Macro that uses Prism primative : Re: Tetrahedron Macro that uses Prism primative Server Time
29 Jul 2024 04:17:48 EDT (-0400)
  Re: Tetrahedron Macro that uses Prism primative  
From: Warp
Date: 7 Dec 2002 03:47:15
Message: <3df1b593@news.povray.org>
Dan Johnson <zap### [at] hotmailcom> wrote:
> Anyone know if this approach
> is actually faster than plane intersections?  

  There was once a long thread in some group about the most efficient way
of making a box with all six sides textured differently.
  Several approaches were made and their rendering times measured. For
example it was done with the intersection of six planes, the union of
six 2-dimensional boxes, six polygons and a mesh. (Also using a single
box with a clever pattern was suggested, but that's irrelevant in this case).
  Perhaps a bit surprisingly, with such a low triangle count the mesh was
not the fastest option. I don't remember which one was, but it might have
been the union of polygons. (The problem with it is that it's not usable
in CSG.)

  In your case the intersection of planes might be just ok. You simply have
to manually bound the tetrahedron eg. with a sphere.
  You might also try using a mesh (with inside_vector you can make it
CSG'able). If you don't need to use the tetrahedron in CSG, you might want
to try a union of four triangles, or even polygons, though I doubt it will
be faster than the union of triangles.
  I think that with such a low triangle count, the union of triangles may
be faster than a mesh.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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