POV-Ray : Newsgroups : povray.binaries.images : A quick povr branch micro normal image. : Re: A quick povr branch micro normal image. Server Time
25 Apr 2024 10:30:07 EDT (-0400)
  Re: A quick povr branch micro normal image.  
From: William F Pokorny
Date: 17 Mar 2022 17:41:22
Message: <6233ab02$1@news.povray.org>
On 3/17/22 11:19, jr wrote:
> Degenerate cylinder, base point = apex point.
> Fatal error in parser: Uncategorized error.
> Render failed

The three lines above come from a test during parsing while additional 
internal data for the cone/cylinder is being done using a function 
within cone.cpp. The tests is finding that the base and apex are <1e-10 
(a) apart - and throwing an error rather than issuing a parse error via 
message(b). The same code exists in POV-Ray proper v3.7 onward and povr 
(c).

(a) - The cone code hasn't been reworked as yet in povr to remove 
'EPSILON' use. The test value there should be ~4.4e-8 or povr's 
gkMinIsectDepthReturned. FWIW.

(b) - The particular test could be done completely inside the parser I 
think. Not sure why it's done in the cone/cylinder shape code.

(c) - There has long been a TODO note in the code suggesting that 
particular throw should be a 'possible error' instead - with execution 
continuing. I don't agree with the TODO note. Where base and apex are 
too close, it's an error in cone/cylinder specification.

---
The puzzle for me at the moment is I have no idea why those parsed base 
and apex vectors would be different between any versions of POV-Ray.

Best guess. It's due some indirect difference where I've moved to 
'double' from 'float' in povr and the previous 'snap' of the vector 
components to floats rounded length 'up' in a way not tripping the 
throw. In other words, values previously rounded such that the base to 
apex length is 'long enough'.

Bill P.


Post a reply to this message

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