POV-Ray : Newsgroups : povray.general : csg > mesh : Re: csg > mesh Server Time
13 Aug 2024 11:25:17 EDT (-0400)
  Re: csg > mesh  
From: Alexander Enzmann
Date: 29 Oct 1998 08:00:39
Message: <01be033b$b5d76aa0$89d45381@aenzmann.mitre.org>
Nieminen Mika <war### [at] assaricctutfi> wrote in article
<3635e08e.0@news.povray.org>...
> Margus Ramst <mar### [at] peakeduee> wrote:
> : Correct me if I'm wrong, but is the fact that most POV primitives are
> : mathematical and 'perfect', an advantage - and yet a weakness?
> 
>   Both.
>   Advantages:
>...
>   - It doesn't consume memory. A mathematical sphere consumes a few bytes
>     of memory,...

Except of course the transforms & textures consume hundreds of bytes.  A
decent image map is many thousands of bytes.

>...

>   Disadvantages:
>   - You mentioned some of them. Non-linear transformations are not easy
to
>     make, and they are quite slow in many cases. UV-mapping is hard to
apply
>     to a mathematical object, etc.

Yes, nonlinear transformations are typically very time consuming if you are
using a raytracing approach.  Not difficult - bend the ray (e.g., use ray
marching and alter the direction component at each step using the inverse
of the transform).  POV-Ray essentially has this (think media).

Determining u/v coordinates is trivial for almost all of the primitives
(most notably the ones that are topologically similar to a rectangle like:
sphere, cone, torus, HF's, Bezier patches, ...).  POV-Ray just doesn't
happen to support it.
> 
>   In some cases it doesn't make sense to convert a primitive to a mesh
(for
> example with bounding objects).
> 

Getting back to the original question - how to get a mesh from a CSG.  This
is actually a valuable bit of software for those companies that have it. 
Accurately doing polygonal CSG involves many special cases and strange
boundary cases.  Getting a mesh for a blob is easy - use marching cubes (or
some similar algorithm, perhaps using continuation to make it go faster)
and dump the triangles.

Xander


Post a reply to this message

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