POV-Ray : Newsgroups : povray.advanced-users : <no subject> : Re: <no subject> Server Time
29 Apr 2024 16:11:30 EDT (-0400)
  Re: <no subject>  
From: clipka
Date: 15 Sep 2018 05:18:51
Message: <5b9cce7b$1@news.povray.org>
Am 15.09.2018 um 00:29 schrieb Bald Eagle:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 14.09.2018 um 21:55 schrieb clipka:
>>
>>> Which is not surprising, since you have
>>>
>>>     #for (U, 0, Usize)
>>>
>>> while the array is only Usize elements long, from 0 to Usize-1.
>>
>> Sorry, that's an imprecise observation; the array is Usize+1 elements
>> long, so it has space for elements from 0 to Usize. But you're only
>> initializing elements from 0 to UU, with UU = Usize-1, so element Usize
>> remains uninitialized.
> 
> While that's the error that POV-Ray reports, it's only symptomatic of the
> initial failure to catch Yvalue = 0, and return a valid array element
> identifier.

(I presume you mean `YVal`)

Then what does this have to do with your latest statement that "The
offender is #declare _Y = function (Angle, _M) {min(max(0, Angle * _M),
_M)}"?


So, if I understand your earlier posts correctly, the following statement:

    #if ( int(YVal*Mult) >= int(UArray [U].y*Mult) &
          int(YVal*Mult) <= int(UArray [U].z*Mult) )

fails to work correctly, because [something in there] has the wrong
value and somehow 0 doesn't seem to compare equal to 0, right?

Well, I don't see that. I do see the statement properly kicking in at
YVal=0, U=0, UArray[U]=<0,0,1.047>.


> All that other stuff that you're looking at is just spurious cruft thrown in to
> see WTF was going on, and will hopefully be fixed.

This would be a lot easier if the scene was something you could point at
and say, "Any mistakes in here are presumably part of the problem".
Spurious cruft just distracts any reader other than you[*] from what's
really going on, especially if it contains errors in itself.

[*Or maybe including you; maybe you've accidently fixed the original
problem by now already, and are being distracted from this factoid by a
similar - or even totally unrelated - symptom caused by the spurious
cruft. Been there, done that.]


Post a reply to this message

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