POV-Ray : Newsgroups : povray.general : Lemon : Re: Lemon Server Time
1 Aug 2024 04:12:51 EDT (-0400)
  Re: Lemon  
From: Chris B
Date: 17 Mar 2006 12:16:12
Message: <441aeedc$1@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> wrote in message 
news:NKv### [at] econymdemoncouk...
> Wasn't it Chris B who wrote:
>>
>>Interestingly on rendering the three solutions side-by-side I see that
>>Mike's solution is the only one that gets lit correctly.
>>I'm not sure why this should be. I've adjusted the light in the SDL below 
>>to
>>emphasize the effect, in case anyone can shed light on this.
>
> I think the CSG torus solver doesn't do quite the right thing with the
> bit in the middle when the minor radius is greater than the major radius
> and the major radius is positive.
>
> Once the surface normals are pointing the wrong way, "inverse" doesn't
> fix them, it only fixes the situation where the inside is on the outside
> and swaps the interior_texture for the texture.
>
> Oddly, these work.
>
> torus {-MajorRadius,MinorRadius
>  pigment {color rgb <0,1,1>}
>  clipped_by {sphere {0,SphereRadius}}
> }
>
> difference {
>  sphere {0,SphereRadius}
>  torus {-MajorRadius,MinorRadius inverse}
>  pigment {color rgb <1,0,1>}
> }
>
> -- 
> Mike Williams
> Gentleman of Leisure

Wow !#!*  That's something I didn't even think of trying :-)

I find the 'difference' version the most bewildering, as I would have 
thought that slicing the 'inverse' of the torus out of the sphere would have 
left the sphere with a bit cut out of the inside, whereas the reverse 
happens. I guess it's safest to recommend not using this torus workaround 
lest the behaviour gets fixed in a future release (given that your 
isosurface provides a perfectly good solution).

Regards,
Chris B.


Post a reply to this message

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