clipka <ano### [at] anonymousorg> wrote:
> >> PEBCAK Error.
> I guess I can do better. Sorry for that. It was intended purely humorously.
Indeed. Still accurate. ;)
> ....the next loop - even if running properly - seems
> to be designed to access StitchedArray up to index 12 and 36, which may
> bite you even after cleaning out the problem currently at hand.
> This is dangerous, as you're using a non-integral loop variable with a
> non-integral stepping, and it may not exactly end up at U2 even though
> mathematically it should. The loop may run sort or long, i.e. Phi may
> end up anywhere between U2-Phi_inc+epsilon to U2+Phi_inc-epsilon.
> The resulting Phi/Phi_inc should nominally be 12, but may be anywhere
> between 12-1+epsilon = 11+epsilon to 12+1-epsilon = 13-epsilon.
> I recommend using `U = ceil(Phi/Phi_inc - 0.5)` or some such, i.e.
> proper rounding.
Which is "wrong" according to some, but if it works, it'll be fine. :)
> Or maybe better still, use U and V as the loop variables, and from those
> compute the angle, rather than vice versa.
"Your code was crap, and didn't anyone ever tell you not to do things like
"The pile of code accumulated as a result of your excremental coding practices
was giving off a pile of steam that was obscuring a logical view of the
"GIVE ME THAT."
(grabs code and hurls the offending parts in the bit bucket)
#for (U, 0, Usize-1)
#for (V, 0, Vsize-1)
#declare Phi = (U*Phi_inc);
#declare Theta = (V*Theta_inc);
Much more better.
And now back to the funnerer stuff.
Today's daily summary:
Broke POV-Ray with a previously unknown bug.
("That's why we let you sit at the Adult keyboard, BE, No one breaks things as
well or as often as you do.")
Spurred good ole' jr to do some fancy array-slinging and show off a bit.
(I think he can do better ;) )
Learned NOT TO DO THAT. EVER AGAIN.
That plus a host of other things made today annoying and arduous, but
Post a reply to this message