POV-Ray : Newsgroups : povray.documentation.inbuilt : SOR documentation : Re: SOR documentation Server Time
8 Jun 2026 04:44:34 EDT (-0400)
  Re: SOR documentation  
From: Bald Eagle
Date: 11 May 2026 19:40:00
Message: <web.6a0267c3251da1bcd1d09a9825979125@news.povray.org>
I am working on documenting and editing the source, as well as doing some work
in SDL.

Perhaps someone can help me out here.
I have some ideas about using and testing the control points of the spline.

POV-Ray complains when I have a control point with an x component that is
negative.  However, the only place that I can find the error, and the conditions
that trigger it - are here:

Starting at line 1005 of sor.cpp
https://github.com/POV-Ray/povray/blob/master/source/core/shape/sor.cpp

        if ((fabs(P[i+2][Y] - P[i][Y]) < EPSILON) ||
            (fabs(P[i+3][Y] - P[i+1][Y]) < EPSILON))
        {
            throw POV_EXCEPTION_STRING("Incorrect point in surface of
revolution.");
        }

But that code only uses the y-values, and only tests the size of the difference
between the y values of 2 sets of control points.  It certainly does NOT include
the x-value of a control point.

So then how is the error getting triggered if there is no testing the x-value???

- BE


sor {
 6
 <-2.0, 0.5>,
 <-1.0, 1>,
 <-0.1, 2>,
 <-0.2, 3>,
 <-1.0, 4>,
 <-2.0, 5>
 pigment {rgb z}
}


Post a reply to this message

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