POV-Ray : Newsgroups : povray.newusers : Where is a bug ? : Re: Where is a bug ? Server Time
14 Sep 2025 10:18:41 EDT (-0400)
  Re: Where is a bug ?  
From: Alain Martel
Date: 1 Sep 2025 16:12:43
Message: <68b5fe3b$1@news.povray.org>
Le 2025-09-01 à 13:12, Bald Eagle a écrit :
> kurtz le pirate <kur### [at] freefr> wrote:
> 
>> The attached image illustrates the issue well. Both objects are defined
>> in the same way, but one is a union{} (magenta) and the other is a
>> merge{} (cyan).
>>
>> It's a very very simple object: two boxes and four cylinders.
> 
> And that's the root of the problem:  it's TOO simple.
> 
> Remove the overlap of the two boxes by defining one central box, and adding FOUR
> "leaves" or "wings" filling in the edges between the cylinder "corners".
> 
> Then I think it should work . . .
> 
> However, you may need to convert your corners from full cylinders to "pie
> slices" by CSG - either home-rolled, or using Lohmueller's macro, which I
> believe is in the drop-down insert menu as "segment of a cylinder"
> 
> -BE
> 
> (Perhaps do some other simple overlap tests to demonstrate what happens.)

For the overlap test, just make one of the boxes a different colour in 
the union case. That will show the coincident surfaces.

union
   {
   box { <-S+R, -H, -S>, <+S-R, 0, +S> pigment{rgb<0,1,0>}}
   box { <-S, -H, -S+R>, <+S, 0, +S-R> pigment{rgb<1,0,0>}}

   object { corner translate <+(S-R), 0, +(S-R)> pigment{rgb<0,0,1>}}
   object { corner translate <-(S-R), 0, +(S-R)> pigment{rgb<0,0,1>}}
   object { corner translate <+(S-R), 0, -(S-R)> pigment{rgb<0,0,1>}}
   object { corner translate <-(S-R), 0, -(S-R)> pigment{rgb<0,0,1>}}
   }

This will make all coincident surfaces obvious.


Post a reply to this message

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