POV-Ray : Newsgroups : povray.newusers : forcing POVray to ignore degenerate cylinders Server Time
25 Nov 2024 10:00:24 EST (-0500)
  forcing POVray to ignore degenerate cylinders (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: shane
Subject: forcing POVray to ignore degenerate cylinders
Date: 12 Feb 2006 11:20:01
Message: <web.43ef5f884162a93c32691d8c0@news.povray.org>
howdyall,

is there still no way to force POVray to ignore degenerate cylinders
altogether and keep parsing and rendering, instead of just stopping? did a
search and it seems this prob goes back to 2002. anyone anywhere ever do
something about it?

basically it seems PYMOL generates a lot of degenerate cylinders when
outputting molecular models to POVray and it's plain too difficult to weed
them all out line by line.

please help. i can barely render anything because of this.

best,
shane


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 12 Feb 2006 11:27:59
Message: <43ef620f$1@news.povray.org>
Please do not mulipost. Keep your post in one group. Please read the 
messages in the FAQ group for posting guidelines.

	Thorsten, POV-Team

PS: Your posts in p.advanced-users and p.general have been removed.


Post a reply to this message

From: shane
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 12 Feb 2006 12:10:00
Message: <web.43ef6add4e14e35732691d8c0@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> Please do not mulipost. Keep your post in one group. Please read the
> messages in the FAQ group for posting guidelines.
>
>  Thorsten, POV-Team
>
> PS: Your posts in p.advanced-users and p.general have been removed.

oh, pardon. just wasn't sure about the group for which the Q was best
suited.


Post a reply to this message

From: Christoph Hormann
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 12 Feb 2006 13:35:03
Message: <dsnv3t$s9e$1@chho.imagico.de>
shane wrote:
> howdyall,
> 
> is there still no way to force POVray to ignore degenerate cylinders
> altogether and keep parsing and rendering, instead of just stopping?

No.  If you don't want a cylinder don't put it in the scene.

> did a
> search and it seems this prob goes back to 2002. anyone anywhere ever do
> something about it?
> 
> basically it seems PYMOL generates a lot of degenerate cylinders when
> outputting molecular models to POVray and it's plain too difficult to weed
> them all out line by line.

You don't have to.  Simply replace any cylinder with a macro call like:

Cylinder(Pos1, Pos2, Radius)

instead of

cylinder { Pos1, Pos2, Radius }

and use a macro like the following to generate the cylinders:

#macro Cylinder(Pos1, Pos2, Radius)
   #if (vlength(Pos2-Pos1)>Radius*0.001)
     cylinder { Pos1, Pos2, Radius }
   #end
#end

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Warp
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 12 Feb 2006 19:07:36
Message: <43efcdc8@news.povray.org>
shane <sha### [at] outsiderbiotechcom> wrote:
> oh, pardon. just wasn't sure about the group for which the Q was best
> suited.

  If it seems to belong to several groups, just post it into one of them.
It's not like the people who know answers would only read a few groups.

-- 
                                                          - Warp


Post a reply to this message

From: Florian Brucker
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 13 Feb 2006 14:02:31
Message: <43f0d7c7$1@news.povray.org>
I was going to add that this will have a pretty bad impact on the parse 
time, but a quick test with 100.000 cylinders took 5 secs to parse 
without and 7 seconds to parse with the macro. So no problem here.

Nevertheless it's annoying that a degenerate cylinder causes a parse 
time error and not a warning. Degenerate triangles, spheres and boxes do 
not trigger errors (in fact they're not even triggering warnings), 
whereas an empty mesh throws an error, too. Is that really necessary? 
What's the problem with ignoring those objects at parse time?


Florian


Post a reply to this message

From: Sebastian H 
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 13 Feb 2006 15:05:44
Message: <43f0e698$1@news.povray.org>
Florian Brucker wrote:
> Nevertheless it's annoying that a degenerate cylinder causes a parse 
> time error and not a warning. 

Not to mention unions containing just one object.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 13 Feb 2006 15:34:55
Message: <43f0ed6f$1@news.povray.org>
Florian Brucker wrote:
> Nevertheless it's annoying that a degenerate cylinder causes a parse 
> time error and not a warning. Degenerate triangles, spheres and boxes do 
> not trigger errors (in fact they're not even triggering warnings), 
> whereas an empty mesh throws an error, too. Is that really necessary? 

Not really, but it certainly was a deliberate choice at the time. Not one I 
personally think was the best, but things like this happen.

> What's the problem with ignoring those objects at parse time?

The errors are for some (did not check all) of these cases due to POV-Ray 
precomputing some values to increase speed of intersection tests right after 
parsing the object. It then detects the object is degenerate and instead of 
deleting the invalid object plus issuing a warning, it generates an error 
because rendering would most certainly fail if the object would be left in 
the scene.

Some of these annoyances have already been addressed in POV-Ray 3.7 betas, 
some more are marked on the POV-Team's internal (well, source code comments, 
not more so far) todo list for 3.7 and others won't make it for 3.7 to get 
improved. Eventually, I suppose all errors should be detected at parse time 
(there are even some detected at render-time!) and issue warnings or 
possible errors (which are non-fatal) and delete the offending object from 
the scene and continue by default,. Of course, other options making this 
still a fatal error might be useful, too, such that nobody wastes days 
rendering a scene just to discover an object is missing due to a typo that 
made in degenerate, and the final image is useless.

	Thorsten


Post a reply to this message

From: Trevor G Quayle
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 13 Feb 2006 15:50:01
Message: <web.43f0f0b94e14e3576c4803960@news.povray.org>
Florian Brucker <tor### [at] torfboldcom> wrote:
> Nevertheless it's annoying that a degenerate cylinder causes a parse
> time error and not a warning. Degenerate triangles, spheres and boxes do
> not trigger errors (in fact they're not even triggering warnings),
> whereas an empty mesh throws an error, too. Is that really necessary?
> What's the problem with ignoring those objects at parse time?
>

As an additional note, degenerate cylinders are not equal to other
degenerate objects.  Other objects that are degenerate are essentially
objects of 0 dimension in all directions, and will not form a surface of
any sort so the rays can pass by without intersection without deleting the
object.  However, a cylinder can be degenerate in length but not radius.
This would be equivilant to a flat disc with zero thickness which would be
a surface that rays can intersect with.  However with no length vectors,
the orientation of this disc is unknown to POV and the surface intersection
cannot be calculated which can cause a calculation problem.
There may be ways that this can be fixed in a newer version as Thorsten has
pointed out, by automatically deleting the offending object, however in
some instances it may not be desired.


-tgq


Post a reply to this message

From: Christoph Hormann
Subject: Re: forcing POVray to ignore degenerate cylinders
Date: 13 Feb 2006 15:50:03
Message: <dsqrbj$uon$1@chho.imagico.de>
Florian Brucker wrote:
> 
> Nevertheless it's annoying that a degenerate cylinder causes a parse 
> time error and not a warning. Degenerate triangles, spheres and boxes do 
> not trigger errors (in fact they're not even triggering warnings), 
> whereas an empty mesh throws an error, too. Is that really necessary? 
> What's the problem with ignoring those objects at parse time?

In contrast to a sphere with radius 0 a degenerate cylinder is not 
simply invisible - it is not well defined how it should look like.  Also 
note triangles, spheres and boxes are not ignored - triangles in a mesh 
are but this is something different.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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