POV-Ray : Newsgroups : povray.documentation.inbuilt : SOR documentation : Re: SOR documentation Server Time
8 Jun 2026 03:51:29 EDT (-0400)
  Re: SOR documentation  
From: Bald Eagle
Date: 13 May 2026 17:50:00
Message: <web.6a04f1d8251da1bcd1d09a9825979125@news.povray.org>
Here's an overview of what I'm planning on doing with sor {}.

in parser.cpp, I'll be removing
if (P[i][X] < 0.0)

In part because it will allow placing the tangent-determining control points
anywhere,
and because I plan on extending the rendering of the sor to the parts that are
currently
not rendered when they cross or get interpolated across the y-axis into -x

The control points will be used to derive the cubic equation of the spline, and
then the
curve equation to will be evaluated to determine if the curve crosses the
y-axis.  If so,
a warning will be issued.
Then the roots (the points where the curve crosses the y-axis) will be found.
The Catmull-Rom spline will be subdivided by creating new subsegments up to the
roots, between the roots, and beyond the roots.

The cubic equation coefficients get stored as A, B, C, and D.
In regions where the spline goes negative in X will have all of the signs of the
coefficients flipped.
That will yield a valid region of the spline segment.

The whole spline will therefore be visibly rendered.

Guard checks on the x & y values, and the height of the spline segments that
include the tangent-controlling points will be fixed to remove the unnecessary
errors.

I have plans to emit the volume of the sor object, and a way to uv-map the
curvature of the surface. (see attached)

Long-term, it would be great to allow defining the sor profile as a spline {}
object and using that spline in the sor {} block syntax.
That would allow using linear and quadratic splines in the sor as well.
The spline would allow easy graphing the cross-section of the sor if desired.
This would also create a new centripetal Catmull-Rom spline type.

Potentially, the positive and negative portions of the sor spline could be
rendered independently.
Allowing descending y-values for the sor would be nice, to allow for
conceptually modelling a sor in the opposite direction.


Post a reply to this message


Attachments:
Download 'sor_curvature_scene_2026-05-13.png' (53 KB)

Preview of image 'sor_curvature_scene_2026-05-13.png'
sor_curvature_scene_2026-05-13.png


 

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