POV-Ray : Newsgroups : povray.newusers : forcing POVray to ignore degenerate cylinders Server Time
29 Jul 2024 14:17:53 EDT (-0400)
  forcing POVray to ignore degenerate cylinders (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Florian Brucker
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 14 Feb 2006 04:41:22
Message: <43f1a5c2@news.povray.org>
Thanks for your opinions about that. I hadn't considered that from a 
mathematical point of view a degenerate cylinder is troublesome 
(although, from a user's point of view it may not be).
I'm glad to hear that the POV team is aware of the issue and that first 
measures will already be included in 3.7.


Florian


Post a reply to this message

From: Warp
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 14 Feb 2006 09:42:01
Message: <43f1ec39@news.povray.org>
Florian Brucker <tor### [at] torfboldcom> wrote:
> Thanks for your opinions about that. I hadn't considered that from a 
> mathematical point of view a degenerate cylinder is troublesome 
> (although, from a user's point of view it may not be).

  The problem is simply that if the endpoints of the cylinder are the
same point but the cylinder has a non-zero radius, POV-Ray cannot know how
to orientate the resulting disc.

  Basically there doesn't exist degenerate spheres (the only exceptional
case is a sphere with a radius of 0, but that's just no sphere at all)
or degenerate boxes (creating an infinitely thin "box" is umambiguous
and thus there's no problem). However, a cylinder with a non-zero radius
but with coincident endpoints is a problem because it can't be created
unambiguously.

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 14 Feb 2006 19:58:00
Message: <43f27c98$1@news.povray.org>
Warp nous apporta ses lumieres en ce 14/02/2006 09:42:
> Florian Brucker <tor### [at] torfboldcom> wrote:
> 
>>Thanks for your opinions about that. I hadn't considered that from a 
>>mathematical point of view a degenerate cylinder is troublesome 
>>(although, from a user's point of view it may not be).
> 
> 
>   The problem is simply that if the endpoints of the cylinder are the
> same point but the cylinder has a non-zero radius, POV-Ray cannot know how
> to orientate the resulting disc.
> 
>   Basically there doesn't exist degenerate spheres (the only exceptional
> case is a sphere with a radius of 0, but that's just no sphere at all)
> or degenerate boxes (creating an infinitely thin "box" is umambiguous
> and thus there's no problem). However, a cylinder with a non-zero radius
> but with coincident endpoints is a problem because it can't be created
> unambiguously.
> 
It's obvious that in that case, the axis of the cylinder is undefined: it's impossible
to know it's 
orientation. You have a few options:
- ignore the object. Don't draw it and issue a warning or a non-fatal error.
- "assume" it's a sphere of the defined radius. Issue a warning about the
"asumption"/conversion. 
This is somewhat similar to scale 0.
- throw a fatal error and abort the render.


-- 
Alain
-------------------------------------------------
Change is inevitable, except from vending machines.


Post a reply to this message

From: Sebastian H 
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 15 Feb 2006 04:02:39
Message: <43f2ee2f$1@news.povray.org>
Alain wrote:
> It's obvious that in that case, the axis of the cylinder is undefined: 
> it's impossible to know it's orientation. 

I second that. There's simply not enough information to define the
object. But why should POV make wild guesses of what it could have
been the user intended. Just drop the thing like a box/sphere of zero
volume. I would prefer just a warning message and no fatal error
in that case.

Sebastian


Post a reply to this message

From: Trevor G Quayle
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 15 Feb 2006 08:30:01
Message: <web.43f32c454e14e3576c4803960@news.povray.org>
"Sebastian H." <van### [at] gmxde> wrote:
> Alain wrote:
> > It's obvious that in that case, the axis of the cylinder is undefined:
> > it's impossible to know it's orientation.
>
> I second that. There's simply not enough information to define the
> object. But why should POV make wild guesses of what it could have
> been the user intended. Just drop the thing like a box/sphere of zero
> volume. I would prefer just a warning message and no fatal error
> in that case.
>
> Sebastian

POV doesn't need to think to 'drop' zero volume spheres and boxes.  They
have no diminesional surface for rays to intersect so they can be left in
the scene as is without causing parsing problems, the individual rays will
pass by them unhindered without POV having to alter the scene.  This is not
the case for cylinders, POV would need to be able to think to see that a
cylinder is degenerate and remove it because of the problem with them as
its been explained.   This additional thinking by POV may add to the
parsing overhead.


-tgq


Post a reply to this message

From: Sebastian H 
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 15 Feb 2006 10:57:57
Message: <43f34f85$1@news.povray.org>
Trevor G Quayle wrote:
> 
> POV doesn't need to think to 'drop' zero volume spheres and boxes.  They
> have no diminesional surface for rays to intersect so they can be left in
> the scene as is without causing parsing problems, the individual rays will
> pass by them unhindered without POV having to alter the scene.  This is not
> the case for cylinders, POV would need to be able to think to see that a
> cylinder is degenerate and remove it because of the problem with them as
> its been explained.   This additional thinking by POV may add to the
> parsing overhead.
> 

This sounds as if the POV parser is in bad need for a
garbage filter. Imagine a typo in a macro produces
boxes with no volume. Actually I tried it and the
only message I got was that there was no pigment given.
With given pigment I could blow up parsing time at will.

#declare c=0;
#while(c<100000)
   box{<0,0,0><0,0,0> pigment {rgb <1,0,0>}}
   #declare c=c+1;
#end

even replies:
Slab Building Error: Out of memory.  Cannot allocate -124288 bytes for 
temporary tree entry.

It shouldn't be too hard to check a box size or a
cylinder length while parsing. Probably it's that
nobody had enough spare time to implement this.

Sebastian


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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