POV-Ray : Newsgroups : povray.general : texture csg difference? : Re: texture csg difference? Server Time
11 Aug 2024 15:16:58 EDT (-0400)
  Re: texture csg difference?  
From: Ron Parker
Date: 23 Jun 1999 16:25:14
Message: <377142aa@news.povray.org>
On Wed, 23 Jun 1999 21:54:03 +0200, ingo wrote:
>Ron Parker heeft geschreven in bericht <377126d2@news.povray.org>...
>>If the documentation says that, it is in error.  It would be exceedingly
>>difficult to do what the documentation says it does.  For example, what
>>color should the cylinder be in this example? (just like the one in the
>>docs, but with different coloring)
>>
>>difference {
>> .....
>>}
>>
>Hoped the hole could be half yellow, half green.
>I have only a very vague notion of how the internals of POV-Ray function.
>Can you explain me, in laymans terms, why it is so difficult to do what the doc
>says?

Mainly because from POV's POV (heh) the hole should be both yellow and
green.  Any point inside lens-shaped object is inside both the green 
sphere and the yellow sphere, and there isn't any reasonable way to 
determine which sphere should be ignored at any given point.  The only
way I can think of to get the results one might expect from that example
would be to figure out which surface is closest and use its color, but
that's not at all easy - there's no way to tell how far a point is from 
a given surface, only whether it's inside it or not.

It could be made to do what the docs say for the case mentioned in the 
docs, by having any untextured objects in a difference inherit the texture
of either the first object in the difference or the first object for 
which the point being tested is inside, but it still wouldn't do what 
you might expect in the case I gave.


Post a reply to this message

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