POV-Ray : Newsgroups : povray.binaries.images : POVEarth still far away... : Re: POVEarth still far away... Server Time: 26 Sep 2020 15:55:10 GMT
  Re: POVEarth still far away...  
From: Bald Eagle
Date: 2 Aug 2020 12:05:00
Yadgar Bleimann wrote:

> always I got the
> memory access error in the 22nd outer iteration (at 1000 by 1000 data
> points; the number of the inner iteration varies wildly!) of the last
> nested loop:

The fact that you're getting a very reproducible error in a highly specific
point in the code, tells me that the problem isn't with your RAM, it's with
either the input to your code, or a calculation in your code, which _might_ (or
might not) be triggering a bug of some sort.

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

>    #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?
If it does, then I would look at the values very carefully, and maybe play some
games like "#(if a = 21)..."
But first I'd also send your values to the #debug stream and perhaps a log file.
Look at the image in P_Texture.  What size is it?  Have you spreadsheeted out
your x, y values to see if they make sense?   What happens at a = 21?
Why is z = 1 instead of 0?
Have you tried using a different image file or running it through a different
piece of software to see if it changes anything? (just give the brightness or
contrast a slight tweak to change the image and save a new version).

>        #declare C_Texture = eval_pigment(P_Texture,
> <(0.5+b)*(1/(xdim-1)), (0.5+a)*(1/(ydim-1)), 1>);

I see that you have this finish statement in _every line_.

>        #write (ES  "  finish{ F_Earthslice }\n")

Why not just define that as the default finish and leave it out?

Post a reply to this message

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