# Seeking for explanation

Why (oh why!) reparameterization isn’t enough?

Can you post a file with the polyline internalised?

Sure thing
test.gh (8.1 KB)

this is interesting, it looks like the Explode component “resets” the Domain of polylines to their lengths regardless of them being Reparametrized, which maybe is just the expected behavior, I just have never noticed it:

test (3_Re).gh (19.4 KB)

I think the problem lies in the original Polyline-segments having weird Domains, not proportional to their relative lengths

I’m thinking that because of this:

test (3)_Re2.gh (20.1 KB)

if the 3 curves composing your original polyline had original domains proportional to their lengths, I would expect that by evaluating a Range of points along the Polyline I would get points always “visually equally spaced”, but I get this:

test (3)_Re3.gh (20.9 KB)

at the same time, joining line segments together into a Polyline also “resets” their Domain into ones that are proportional to their length:

so those polylines were never exploded / joined before, at least after “something magic” happened… and the only “something magic” thing that comes to my mind is that those Polylines might be some sort of planar projection of curves that were MUCH LONGER, in such a way each of them “inherited” their old domain?

like in this case:

test (3)_Re4.gh (15.3 KB)

all this happens just because Reparametrize doesn’t actually change the proportion of the domains, it just Remaps them in such a way they go [0, 1]
so if the Domain of single lline-segments were not proportional to their lengths before being Reparametrized, they will keep being not proportional to their length also when Remapped [0, 1]

1 Like

That polyline is the fragment of the rectangle, nothing extremely large about to justify the domain reading that tiny 0.004… value.
I was thinking to this day that reparameterization is remapping the whatever-input-there-was.

well, it does remap whatever-input-there-was into a final Domain [0,1]

the main point is, whatever ratio between the various Domains that compose the Polyline (them being proportional to segment length, or not proportional) they are just rescaled into a final [0,1] Domain, the ratio between the different Domains is always the very same

here the top curve is not Reparametrized, the bottom one is Reparametrized
the white numbers on the corners are the parameter t at which each corner exists
the red numbers along the segments are the “Domains width” of each segment

test (3)_domains.gh (19.1 KB)

in the top case, no reparametrization happening, the left vertical segments is like 4 times longer than the right one:
and the right vertical segment, which is 4 times shorter in length, has a Domain of 0.055424, which is 31 times bigger

when you Reparametrize this, the ratio between Domains is mantained, so the Domain of the right segment is still 31 times bigger than the left one, but all the domains are rescaled into [0,1]:

Whatever the domain, it should be proportional after reparatrimization.
I saw this kind of behaviour on a nurbs curves but not on polylines.
Maybe there is an explanation to that but this example caught me off-guard, questioning the things I have done before, based on my assumption of proportional t parameter.

1 Like

it is proportional indeed, but if you Reparametrize the whole Polyline, then you are not touching the Domain of the Lines which compose it, you are just remapping their original domains in such a way the final Polyline Domain is [0,1]

t parameter always moves linearly for Lines, it also moves linearly in your file

for each of your Lines, the perfect center of each Line’s Domain will fall exactly on the Line middle point:

Domain_middle_point.gh (12.6 KB)

and of course if you divide each Domain into n points, those will exactly be the very same points you get if you use Divide Curve with n divisions:

Divide Curve and Divide Domain.gh (16.4 KB)

but the Domain of existence of each of those lines in your file is not proportional to the respective Line length