POV-Ray : Newsgroups : povray.documentation.inbuilt : SOR documentation Server Time
11 Jun 2026 15:38:34 EDT (-0400)
  SOR documentation (Message 68 to 77 of 80)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>
From: William F Pokorny
Subject: Re: SOR documentation
Date: 29 Oct 2025 06:48:04
Message: <6901f0e4$1@news.povray.org>
On 10/24/25 05:02, William F Pokorny wrote:
> I think the normalization - including y - is necessary for other reasons 
> like the generation of the polynomials, but I also believe I see your 
> point about what is needed for the initial bounding cylinder check, 
> specifically. I'll try with branch-off code which drops the 'y' 
> component for the initial cylinder test only.
> 

See the attach code excerpt file for what I've settled upon for the 
changes.

> Aside: I'd make a moderate bet this tangled with the issues I had in 
> some rotation about x tests where parts (partial segments/intervals) of 
> the sor would drop out. IIRC, those tests included negative on curve 
> (between end control points, points). We'll see.

Lost my bet here.

Bill P.


Post a reply to this message


Attachments:
Download 'sorcodeupdate.cpp.txt' (3 KB)

From: Bald Eagle
Subject: Re: SOR documentation
Date: 1 Nov 2025 13:45:00
Message: <web.69064669251da1bc1f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> I think it's good enough to begin testing the Catmull-Rom bounding.

Here's what I presently have in terms of computing per-segment bounding
cylinders.
Now I just need to code up some bounding cylinder intersection tests to see what
happens.

> Also, there is a mouse in my kitchen.

I have adopted a local stray.
No mouse, but now there is a cat that gets onto my kitchen counter.   :|

Am I winning yet?

- BE


Post a reply to this message


Attachments:
Download 'cr_2d_demo.png' (54 KB)

Preview of image 'cr_2d_demo.png'
cr_2d_demo.png


 

From: Bald Eagle
Subject: Re: SOR documentation
Date: 8 May 2026 15:50:00
Message: <web.69fe3d4d251da1bcd0f21c5825979125@news.povray.org>
Just putting this here for general reference:

The "cubic_spline" type is a Catmull-Rom spline.
So a cubic spline sphere sweep ought to be able to be overlaid on a sor rendered
with an orthographic camera.

Now, there were some old posts by Rune in 2002 where it seems that different
types of spline were given the same name, and which spline you actually got,
depended on which shape you used - prism, spline, sphere sweep, etc.
I don't know if that's still the case.
(It looks like Mark Wagner coded a lot of the spline types.)

This would be something that we need to investigate and document, prior to
delving in a fixing/renaming/aliasing the spline types.

--------------------------------------------------------------------


https://news.povray.org/pan.2002.09.24.02.24.44.755861.210%40gte.net

From: Mark Wagner
Subject: Re: splines
Date: 23 Sep 2002 22:25:37
Message: <pan### [at] gtenet>




On Sun, 22 Sep 2002 19:20:02 -0400, Chris Colefax quoth:

> Fidel viegas <fid### [at] artrecognitioncouk> wrote:
>> Is there any macro that supports hermite curves? Does povray support
> hermite
>> curves? And what are they really good for? Isn't cubic splines enough
>> to create any kind of smooth camera or object animation?
>
> The term "cubic" refers to the degree of the equations used to calculate
> the spline path.  All the cubic splines (Bezier, Catmull-Rom, Hermite,
> Kochanek-Bartels) are just different ways of specifying the inputs for
> the spline, and it's not too difficult to perform conversions from one
> to another.

There's also a "natural cubic spline" type that can't easily be converted
to/from.  POV-Ray 3.5's "natural_spline" is a natural cubic spline.  The
"cubic_spline" type is a Catmull-Rom spline.

--
Mark


Post a reply to this message

From: ingo
Subject: Re: SOR documentation
Date: 9 May 2026 03:36:17
Message: <69fee3f1$1@news.povray.org>
On 2026-05-08 21:45, Bald Eagle wrote:

> The "cubic_spline" type is a Catmull-Rom spline.
> So a cubic spline sphere sweep ought to be able to be overlaid on a sor rendered
> with an orthographic camera.
> 

I did that with my curve.inc from https://ingoogni.nl/download/ (curve.zip)

---%<------%<------%<---
//cmd: +w400 +h400 +am2 +a0.01

#version 3.7;

#include "curve.inc"

#global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 emission 0}}

sor {
   8,
   <0.0,  -0.5>,
   <3.0,   0.0>,
   <1.0,   0.2>,
   <0.5,   0.4>,
   <0.5,   4.0>,
   <1.0,   5.0>,
   <3.0,  10.0>,
   <4.0,  11.0>
   open
   pigment {rgb 1}
   sturm
}

#declare vC = array[8]{
   <0.0,  -0.5, 0.0>,
   <3.0,   0.0, 0.0>,
   <1.0,   0.2, 0.0>,
   <0.5,   0.4, 0.0>,
   <0.5,   4.0, 0.0>,
   <1.0,   5.0, 0.0>,
   <3.0,  10.0, 0.0>,
   <4.0,  11.0, 0.0>
};

#declare Test = CIcatmull(vC);
#for(T, 0, 1, 0.0015)
   sphere{CIget(Test, T), 0.05 pigment{rgb <1,0,0>} translate <0.1,0,0>}
#end

camera {
   orthographic angle 60
   location  <0, 5, -12>
   right     x*image_width/image_height
   look_at   <0, 5, 0.0>
}

light_source{<0, 10,-3000> color rgb 1}
---%<------%<------%<---

Note, the red line of the CatmullRom is slightly translated to the 
right. I does not match exactly. The CatmullRom is a case of Cardinal 
spline where one can set the tension. I have it implemented and a bunch 
of other types in Nim. I'll try to get them in POV-Ray and test against 
the SORspline.

ingo


Post a reply to this message


Attachments:
Download 'compare_sor.png' (37 KB)

Preview of image 'compare_sor.png'
compare_sor.png


 

From: ingo
Subject: Re: SOR documentation
Date: 9 May 2026 04:33:20
Message: <69fef150$1@news.povray.org>
On 2026-05-09 09:36, ingo wrote:
> On 2026-05-08 21:45, Bald Eagle wrote:

in addition, another interesting one to convert is a "bezier style" 
version of the CatmullRom spline. The handles work just like in bezier. 
The reason I thought of this is you mentioning the "natural cubic" 
https://sites.millersville.edu/rbuchanan/math375/CubicSpline.pdf

This is comparable to Akime curves. A system is set up to define a the 
tangents at the endpoints (tridiagonal) of a curve segment. Using these 
and the Hermite curve matrix, the whole thing is resolved.

You can convert any Hermite slopes based curve (natural cubic, monotone, 
Akima, etc.) to Catmull-Rom "Bezier-style" 4-point form.

I have, excusez le mot, a half arsed attempt at code for that in Nim. 
Would take a lot of time to get it going and converted to an include file.

ingo


Post a reply to this message

From: ingo
Subject: Re: SOR documentation
Date: 9 May 2026 06:04:51
Message: <69ff06c3@news.povray.org>
On 2026-05-09 09:36, ingo wrote:
> The CatmullRom is a case of Cardinal spline

Added Cardinal and played with tension.

---%<------cardinal for curve.inc---%<------%<---
#macro CIcardinal(CIarr, Tension)
   //:Quadratic Cardinal curve
   #local DimSeg = 4;
   #local Step = 1;
   #local Div = 1;
   #local T = (1 - Tension) / 2;
   #local Matrix = array[4]{
       array[4]{     -T, 2.0 - T,         T - 2.0,   T},
       array[4]{2.0 * T, T - 3.0, 3.0 - (2.0 * T),  -T},
       array[4]{     -T,     0.0,               T, 0.0,},
       array[2]{    0.0,     1.0}
   }
   _CIinit(CIarr, DimSeg, Step, Matrix)
#end
---%<------%<------%<------%<---


---%<------cardinal for scene file---%<------%<---
#declare Test = CIcardinal(vC, 0.65);
#for(T, 0, 1, 0.0015)
   sphere{CIget(Test, T), 0.05 pigment{rgb <1,0,0>} translate <0.1,0,0>}
#end
---%<------%<------%<------%<---

neither of both curves give the C2 continuity that a natural cubic 
spline gives. The slight curvature in the glass and the stem. My guess 
would be SOR is a natural cubic spline. I.i.r.c. ABX had the SOR spline 
implemented as a spline in one of patched versions. SuperPov, UeberPov?

ingo


Post a reply to this message


Attachments:
Download 'compare_sor_cardinal.png' (37 KB)

Preview of image 'compare_sor_cardinal.png'
compare_sor_cardinal.png


 

From: Bald Eagle
Subject: Re: SOR documentation
Date: 9 May 2026 07:40:00
Message: <web.69ff1cfb251da1bcd1d09a9825979125@news.povray.org>
Thank, Ingo - for this and all the other attached work.
The spline + shape from the docs is very informative.

The sor is a centripetal Catmull rom cubic Hermite spline with a tension, or
exponent of 0.5.

I'm not sure what cubic_spline is, but having played with that one in the past,
it may not be.  I'm pretty sure that TOK has implemented the natural cubic
spline.

I'll have to pull up github or the 3.7 source on my local machine and hunt down
all of the implementations of spline types so that I can find out where they all
are and accurately classify them.

Thet really need to be all in one place, and not buried inside specific shapes
like CR is with sor.

- BW


Post a reply to this message

From: ingo
Subject: Re: SOR documentation
Date: 9 May 2026 08:36:46
Message: <69ff2a5e$1@news.povray.org>
On 2026-05-09 13:39, Bald Eagle wrote:
> centripetal Catmull

Ah, the one that got away. Not doable with curve.inc in it's current 
state. In my Nim curve lib, the same state as for natural cubic. Find 
slopes and the use Hermite interpolation. So I cannot create a curve of 
spheres for POV-Ray from there either.



ingo


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: SOR documentation
Date: 9 May 2026 22:05:00
Message: <web.69ffe6fa251da1bc3d189bf689db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Thank, Ingo - for this and all the other attached work.
> The spline + shape from the docs is very informative.
>
> The sor is a centripetal Catmull rom cubic Hermite spline with a tension, or
> exponent of 0.5.
>
> I'm not sure what cubic_spline is, but having played with that one in the past,
> it may not be.  I'm pretty sure that TOK has implemented the natural cubic
> spline.
>...

Yes, I did - some years ago ;-)

Newsgroup: povray.text.scene-files
From: Tor Olav Kristensen
Subject: Even spacing of points along natural cubic splines
Date: 2010-12-12 09:30:00
http://news.povray.org/povray.text.scene-files/thread/%3Cweb.4d04dadb31d78932c734aecd0%40news.povray.org%3E/

--
Tor Olav
http://subcube.com
https://github


Post a reply to this message

From: kurtz le pirate
Subject: Re: SOR documentation
Date: 10 May 2026 03:41:09
Message: <6a003695$1@news.povray.org>
On 10/05/2026 04:02, Tor Olav Kristensen wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> Thank, Ingo - for this and all the other attached work.
>> The spline + shape from the docs is very informative.
>>
>> The sor is a centripetal Catmull rom cubic Hermite spline with a tension, or
>> exponent of 0.5.
>>
>> I'm not sure what cubic_spline is, but having played with that one in the past,
>> it may not be.  I'm pretty sure that TOK has implemented the natural cubic
>> spline.
>> ...
> 
> Yes, I did - some years ago ;-)
> 
> Newsgroup: povray.text.scene-files
> From: Tor Olav Kristensen
> Subject: Even spacing of points along natural cubic splines
> Date: 2010-12-12 09:30:00
>
http://news.povray.org/povray.text.scene-files/thread/%3Cweb.4d04dadb31d78932c734aecd0%40news.povray.org%3E/



A few experiments I had also conducted, but for Bézier curves.
SDL attached.


-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message


Attachments:
Download 'bezier_repartition_uniforme.pov.zip' (3 KB)

<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>

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