POV-Ray : Newsgroups : povray.programming : An inside/outside test for triangles mesh : Re: An inside/outside test for triangles mesh Server Time
29 Jul 2024 06:16:18 EDT (-0400)
  Re: An inside/outside test for triangles mesh  
From: Bob Hughes
Date: 8 Mar 1999 01:12:46
Message: <36E36A22.2511673D@aol.com>
My understanding was that they are part-time workers in CSG. Either they
do or they don't function correctly in difference, intersection or
merge. What I don't understand is *when* that is the case. Believe it's
something to do with the intersection angle (of course) since the
primitives have to be found in the right way all along the CSG. I've
used these before too in CSG, regardless of the statements in the DOC,
as well as many other things I do right or wrong.


Ken wrote:
> 
> On a side note to this thread I have always assumed from what is specified
> in the docs that mesh objects are not allowed in csg operations.
> 
> From the Pov v3.1d documentation:
> 
> ------------------------
> 
> Finite Patch Primitives
> 
> There are six totally thin, finite objects which have no well-defined inside.
> They are bicubic patch, disc, smooth triangle, triangle, polygon and mesh.
> They may be combined in CSG union but cannot be use in other types of CSG
> (or inside a clipped_by statement).
> 
> ---------------------------------
> 
>   It specificaly states that these objects CANNOT be used in any csg operation
> except for a union. If you take a moment to render the code below this note
> you will find that this is not altogether true. I put together 4 triangles
> that make up a square flat face for simplicity sake. The csg operations
> that I have illustrated below work perfectly and the only thing the parser
> does in protest is issue a quiet warning that patch objects are not allowed
> in csg operations.
> 
> Comments anyone ?
> 
> /******************************/
> 
> camera{location<0,0,-5>look_at 0}
> light_source{<0,0,-30>rgb 1}
> 
> // first operation
> 
>  intersection{
>    mesh {
>     triangle{<-1,-1,0>,<0,0,0>,< 1,-1,0>}
>     triangle{<-1,-1,0>,<0,0,0>,<-1, 1,0>}
>     triangle{<-1, 1,0>,<0,0,0>,< 1, 1,0>}
>     triangle{< 1, 1,0>,<0,0,0>,< 1,-1,0>}
>     pigment{rgb 1}
>    } // end mesh object
> 
>     sphere{0,.5
>       pigment{blue 1}
>      inverse
>     } // end sphere object
> 
>    translate<-1.5,0,0>
> 
>   } // end intersection
> 
> // second operation
> 
>  difference{
>    mesh {
>     triangle{<-1,-1,0>,<0,0,0>,< 1,-1,0>}
>     triangle{<-1,-1,0>,<0,0,0>,<-1, 1,0>}
>     triangle{<-1, 1,0>,<0,0,0>,< 1, 1,0>}
>     triangle{< 1, 1,0>,<0,0,0>,< 1,-1,0>}
>     pigment{rgb 1}
>    } // end mesh object
> 
>     sphere{0,.5
>       pigment{blue 1}
>      inverse
>     } // end sphere object
> 
>    translate<1.5,0,0>
> 
>   } // end intersection
> 
> /*********************************/
> 
> --
> Ken Tyler
> 
> mailto://tylereng@pacbell.net

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
 mailto:inv### [at] aolcom?PoV


Post a reply to this message

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