POV-Ray : Newsgroups : povray.binaries.images : Bug in Supercone()? Server Time
4 Nov 2024 22:18:22 EST (-0500)
  Bug in Supercone()? (Message 1 to 2 of 2)  
From: Cousin Ricky
Subject: Bug in Supercone()?
Date: 21 Mar 2008 14:35:01
Message: <web.47e40ce72d3a644685de7b680@news.povray.org>
I get very odd results with the parameters that follow.  Am i doing something
wrong?

_________________________________________________

#include "shapes.inc"

#declare R1 = 0.05;
#declare R2 = 0.25;

#declare Test1 = Supercone (0, R1, R1, y, R1, R2)

#declare Test2 = difference
{  box { <0, -0.1, 0>, <R1, 0.9, 0.5> }
   object { Test1 }
}

union
{  object { Test1 translate <-0.5, -0.5, 0> }
   object { Test2 translate <0.5, -0.5, 0> }
   pigment { rgb y }
   finish { specular 0.2 }
}

global_settings { assumed_gamma 1 }

camera
{  look_at 0
   location <-3, 2, -5>
   angle 15
}

light_source { <-2, 3, -1> * 10000, rgb 1 }

plane { y, -1 pigment { checker rgb 0.5 rgb 1 } }


Post a reply to this message


Attachments:
Download 'stuporcone.png' (28 KB)

Preview of image 'stuporcone.png'
stuporcone.png


 

From: Chris B
Subject: Re: Bug in Supercone()?
Date: 21 Mar 2008 15:45:40
Message: <47e41e74$1@news.povray.org>
"Cousin Ricky" <ric### [at] yahoocom> wrote in message 
news:web.47e40ce72d3a644685de7b680@news.povray.org...
>I get very odd results with the parameters that follow.  Am i doing 
>something
> wrong?
>
> _________________________________________________
>
> #include "shapes.inc"
>
> #declare R1 = 0.05;
> #declare R2 = 0.25;
>
> #declare Test1 = Supercone (0, R1, R1, y, R1, R2)
>

Hi Cous.,

I think you're just going a bit small. If you look at the quartic for the 
Supercone macro it's using the products of the squares of the radii in 
places which means it's working with very small numbers. I'd guess you're 
just a victim of rounding errors.

If you use:

 #declare Test1 = object {Supercone (0, 10*R1, 10*R1, 10*y, 10*R1, 10*R2) 
scale 0.1}

you should avoid the problem.

Regards,
Chris B.


Post a reply to this message

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