POV-Ray : Newsgroups : povray.binaries.images : Bug in Round_Cone macro Server Time
4 Nov 2024 15:20:43 EST (-0500)
  Bug in Round_Cone macro (Message 1 to 2 of 2)  
From: Bill Pragnell
Subject: Bug in Round_Cone macro
Date: 10 Apr 2008 06:40:00
Message: <web.47fdedf2c9d6baff731f01d10@news.povray.org>
I've found a bug in the Round_Cone macros in shapes.inc. I'm not sure if this
counts as a 'proper' POV-ray bug, but I wanted to post an illustration too so
it can go here for now. Should I also post this to povray.bugreports?

Anyway, the problem is that for very shallow-angled cones (i.e.,
baseradius-topradius >> height), there is a small gap running around the larger
end, between the torus and the two bulk cones. It is quite clear in the image
below.

It may have an adverse effect on CSG as a union and on transparent cones as a
merge. The fix is quite simple, and involves simply filling the end torii with
cylinders. Just add this code to the body of the macro:

cylinder { PA, PA + 2*Axis*EdgeRadius, R1 }
cylinder { PB, PB - 2*Axis*EdgeRadius, R2 }

anywhere inside the union/merge and after R1 and R2 are defined.

Hope this helps

Bill


Post a reply to this message


Attachments:
Download 'conedemo.jpg' (26 KB)

Preview of image 'conedemo.jpg'
conedemo.jpg


 

From: Alain
Subject: Re: Bug in Round_Cone macro
Date: 11 Apr 2008 12:57:03
Message: <47ff985f$1@news.povray.org>
Bill Pragnell nous apporta ses lumieres en ce 2008/04/10 06:37:
> I've found a bug in the Round_Cone macros in shapes.inc. I'm not sure if this
> counts as a 'proper' POV-ray bug, but I wanted to post an illustration too so
> it can go here for now. Should I also post this to povray.bugreports?
> 
> Anyway, the problem is that for very shallow-angled cones (i.e.,
> baseradius-topradius >> height), there is a small gap running around the larger
> end, between the torus and the two bulk cones. It is quite clear in the image
> below.
> 
> It may have an adverse effect on CSG as a union and on transparent cones as a
> merge. The fix is quite simple, and involves simply filling the end torii with
> cylinders. Just add this code to the body of the macro:
> 
> cylinder { PA, PA + 2*Axis*EdgeRadius, R1 }
> cylinder { PB, PB - 2*Axis*EdgeRadius, R2 }
> 
> anywhere inside the union/merge and after R1 and R2 are defined.
> 
> Hope this helps
> 
> Bill
> 
> 
> ------------------------------------------------------------------------
> 
That gape is always present, even when the top and base radius are the same. The 
same apens with the rounded cylinder macro.
Thank for spoting it and posting the correction.

-- 
Alain
-------------------------------------------------
Unitarian: Shit that happens to one person is just as bad as shit that happens 
to another.


Post a reply to this message

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