POV-Ray : Newsgroups : povray.documentation.inbuilt : SOR documentation : Re: SOR documentation Server Time
15 Sep 2025 10:02:41 EDT (-0400)
  Re: SOR documentation  
From: Bald Eagle
Date: 9 Sep 2025 15:50:00
Message: <web.68c08422251da1bcfceb8cd325979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Now, moving down to line 1078, we have:
>         while (n--)
>         {
>             if ((r[n] >= y[0]) && (r[n] <= y[1]))
>             {
>                 x[n] = sqrt(r[n] * (r[n] * (r[n] * A + B) + C) + D);
>             }
>         }
>
> and I'm confused as to why r is getting compared to the y value and not the x
> value.  It seems that the radius ought to be compared to the control point x
> values - unless I'm missing something.

This is because good ole' Dieter likes to mix and match labels between the
comments and the code.
r here is the array of roots found by the polynomial solver, not the radius of
the sor at that height (which is x).  So we're just checking to make sure we're
testing between the roots.  Still need to see why the roots bracket a spline
segment . . .

- BW


Post a reply to this message

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