POV-Ray : Newsgroups : povray.binaries.images : Bug in Round_Cone macro : Bug in Round_Cone macro Server Time
1 Aug 2024 18:29:03 EDT (-0400)
  Bug in Round_Cone macro  
From: Bill Pragnell
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


 

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