POV-Ray : Newsgroups : povray.general : Parse Error: Degenerate cylinder Server Time
6 Nov 2024 20:20:08 EST (-0500)
  Parse Error: Degenerate cylinder (Message 1 to 4 of 4)  
From: Florian Brucker
Subject: Parse Error: Degenerate cylinder
Date: 28 Mar 2004 10:05:22
Message: <4066e9b2$1@news.povray.org>
I just wanted to ask if it is possible to change the parse time error

"Parse Error: Degenerate cylinder, base point = apex point."

into a simple warning. The same goes for a mesh without triangles. I 
don't see why the render has to be stopped in such a case. IMHO it is 
good to inform the user about it, but rendering could go on, couldn't it?

I ran into this in an object generating macro and of course I could 
check the points before creating the cylinder, but that would really 
increase parse time. And no, I don't want this changed because I'm too 
lazy to check the points, but because I think the current behaviour is 
unnecessarily strict (And it would be a really small change, too).

Spring is coming!
Florian


Post a reply to this message

From: Chambers
Subject: Re: Parse Error: Degenerate cylinder
Date: 30 Mar 2004 17:39:07
Message: <4069f70b$1@news.povray.org>
"Florian Brucker" <tor### [at] torfboldcom> wrote in message
news:4066e9b2$1@news.povray.org...
> I just wanted to ask if it is possible to change the parse time error
>
> "Parse Error: Degenerate cylinder, base point = apex point."
>
> into a simple warning. The same goes for a mesh without triangles. I
> don't see why the render has to be stopped in such a case. IMHO it is
> good to inform the user about it, but rendering could go on, couldn't it?


It's especially odd because other non-viewable objects, such as cylinders
and spheres with radii of 0 or even negative numbers, don't even generate
warnings.  Perhaps its something with how the cylinder is processed
internally, that is, what is the function for a cylinder?  It might be
something that just chokes when the two points are the same.

-- 
...Chambers
http://www.geocities.com/bdchambers79


Post a reply to this message

From: Tyler Eaves
Subject: Re: Parse Error: Degenerate cylinder
Date: 30 Mar 2004 20:07:05
Message: <pan.2004.03.31.01.09.13.230617@NOSPAMml1.net>
On Tue, 30 Mar 2004 14:39:06 -0800, Chambers wrote:


> 
> It's especially odd because other non-viewable objects, such as cylinders
> and spheres with radii of 0 or even negative numbers, don't even generate
> warnings.  Perhaps its something with how the cylinder is processed
> internally, that is, what is the function for a cylinder?  It might be
> something that just chokes when the two points are the same.

I think that's the case. My theory is this. A cylinder with both points
equal is a disc, or to put it another way, the intersection of a sphere
and a plane. However, pov-ray doesn't (can't) know what the plane would
be, thus it's ambiguous.


Post a reply to this message

From: Florian Brucker
Subject: Re: Parse Error: Degenerate cylinder
Date: 31 Mar 2004 06:33:36
Message: <406aac90@news.povray.org>
>>It's especially odd because other non-viewable objects, such as cylinders
>>and spheres with radii of 0 or even negative numbers, don't even generate
>>warnings.  Perhaps its something with how the cylinder is processed
>>internally, that is, what is the function for a cylinder?  It might be
>>something that just chokes when the two points are the same.
> 
> I think that's the case. My theory is this. A cylinder with both points
> equal is a disc, or to put it another way, the intersection of a sphere
> and a plane. However, pov-ray doesn't (can't) know what the plane would
> be, thus it's ambiguous.

I'd just say skip
- meshes with no triangles
- spheres and cylinders with radii = 0
- cylinders with apex = base
- all the other non-viewable objects

simply generate a warning that the object has been ignored. In the case 
of the cylinder (apex=base) being a disc actually, I think, as this disc 
is not really defined (because it's normal can not be computed), it's as 
senseless as a sphere with radius 0.

Florian


Post a reply to this message

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