POV-Ray : Newsgroups : povray.binaries.images : POVEarth still far away... : Re: POVEarth still far away... Server Time: 24 Sep 2020 17:29:09 GMT
  Re: POVEarth still far away...  
From: Jörg "Yadgar" Bleimann
Date: 2 Aug 2020 14:03:44
Hi(gh)!

On 02.08.20 14:03, Bald Eagle wrote:

> by "the 22nd outer iteration ... of the last nested loop", I prsume that you
> mean when a = 21?

Technically, it's the 23rd iteration, i. e. when a=22!
I now scaled the original 3601 by 3601 heightfield down to 1000 x 1000 
(instead of just using 1000 x 1000 eval_pigment() tracing points on the 
original heightfield) using GIMP and no interpolation(!) - and got 
exactly the same result: memory access error at a=22!

Then I took a close look at the pixels in that row (as the lines are 
processed in ascending order, this is line 977 (999-22) in the GIMP 
display) - and found nothing suspicious, the first pixel in that line is 
rgb <74, 230, 0>, which should calculate to something like
rgb <0.290196078, 0.901960784, 0> in eval_pigm().

> 
>>     #while (a<ydim)     // outer loop
> 
> Here it looks to me that you have a calculation that then gets passed to a
> function that operates on image data.  I just have the feeling that this is the
> line that triggers the error.   Have you tried commenting that out and running
> the code to see if it completes?

I tried this (and used a uniform color, rgb <0.5, 0.5, 0.5>)... before, 
I also discovered another flaw in the code, res was still set to 3601... 
I corrected this to 1000, which did not change anything.

But now with the uniform color, it's even more absurd: the loop breaks, 
but no longer consistently at a=22, but during the first run at a=19, 
during the second once more at a=22, during the third run at a=20...

> But first I'd also send your values to the #debug stream and perhaps a log file.

How do I do this?

See you in Khyberspace!

Yadgar


Post a reply to this message

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