|
|
Jan Dvorak nous apporta ses lumieres en ce 2007/11/04 10:46:
> M_a_r_c napsal(a):
>> "PhilipIsPDR" <nomail@nomail> a écrit dans le message de news:
>> web.472dcf35dc25d7085a2aacfe0@news.povray.org...
>>> Does anyone know a way of accomplishing this? I've looked and
>>> looked, and I
>>> realise I might be missing something very obvious...
>>>
>> What is obvious is that you did not make a research about the word
>> "inside" in the pov documentaion :-)
>>
>> Marc
>>
> what is obvious is that you missed he doesn't test for a point. He tests
> for an object being inside another.
>
> One idea is to choose a point where the inner surface is seen completely
> when unoccluded and then trace it together with the other object. If all
> of your rays hit the object you know it's not being intersected by the
> other object, hoping not to miss anything. Then use inside() to know
> whether it is completely inside or completely outside. There is no
> general algorithm to find out if two objects have non-null intersection.
The thing to do is to make two objects: one for the actual rendering, and
another one, smaler, for the tests. If you want to fill your shape with spheres,
like marbles in a jar, the smaller object have dimentions that are that of the
containing object minus the radius of the spheres.
--
Alain
-------------------------------------------------
War is an instrument entirely inefficient toward redressing wrong; and
multiplies, instead of indemnifying losses.
Thomas Jefferson
Post a reply to this message
|
|