I am still struggling with my current project, so after hours of thinking Ive decided to ask another question to you guys again. For my current project, I am implementing a software which interpolates a spline with given vertices. For this, I am using the deBoor algorithm with uniformed vector knots (3rd degree).
Since I am reproducing the behaviour of another software (basically I am creating an open source version of it), I want to analyse and know how certain things are implemented on his software.
Imagine you have 6 vertices, so there are 5 Segments (t 0..1, t 1..2, t 2..3, t 3..4, t 4..5). I want to know the lenghts of each segment, which is generated in that software (but can´t figure out how he calculates the segment lengths). Thats my question. Based on following example data, how did he calculated those segment lengths? What do you guys think?
Here, some example data, from the other software.
P0 (0, 0)
P1 (10, 10)
P2 (0, -10)
P3 (50, 10)
P4 (30, -10)
P5 (20, -10)
Which results following Segment lengths:
S0 7,86m
S1 7,9m
S2 26,33m
S3 11,28m
S4 11,39m
These are the Choord lengths of the segments:
C0 14,1421m
C1 22,3606m
C2 53,8609m
C3 28,302m
C4 10mm
Spline length:
64.76m
Here is an example plot (shows how the spline is subdevided into those segments):
Maybe this graph also helps to visualize how the segments are splitted (on straight line, so ignore y axis):
**Here is another example with 12 vertices (11 segments) **
P00 (0, 0)
P01 (10, 50)
P02 (10, -10)
P03 (30, 40)
P04 (30, 10)
P05 (20, 0)
P06 (20, -10)
P07 (40, -30)
P08 (49, -20)
P09 (50, 30)
P10 (39, 20)
P11 (39, 70)
Which results following Segment lengths:
S0 23.06m
S1 23.04m
S2 21.83m
S3 15.92m
S4 14.93m
S5 12.66m
S6 20.3m
S7 17.66m
S8 32.8m
S9 26.11m
S10 26.2m
These are the Choord lengths of the segments:
C0 10m
C1 22.3607m
C2 53.8609m
C3 30.0167m
C4 14.1421m
C5 10m
C6 28.2843m
C7 14.1421m
C8 50m
C9 14.1421m
C10 50m
Spline length:
234.51m



