Divide polycurve in unequal segments

Hi All,

I am looking for a mathematical formula.
I have a polycurve with length L. I want to divide this polycurve into X number of segments. But the middle segment (or middle two) are the largest, and the segments become smaller toward the ends of the polycurve. Variable Y (slider input) would then be the calculation factor for scaling/reducing the segments.
Can any of the math gurus come up with something for this?
Thank you in advance.

1 Like

@MJB-online

I think there are online translators from math to python online, i think thats a raff idea… to get values

KR

Andreas

2 Likes

It’s a little messy, but I think it works.
Curve.dyn (20.6 KB)

2 Likes

Cool effect. What’s this for? :smiley:

1 Like

Circular or quadratic are possibilities


6 Likes

Hi everybody,

@Draxl_Andreas, @bayowindapo, @Mike.Buttery
Thanks for all the responses, you all pointed me in the right direction. The script below is what I made of it (with standard nodes). It could probably be done much more elegantly with Designscript or Python, but I’m satisfied. I can divide the curve into segments with a slider. With the Percentage slider I can control the difference of the segment lengths. With a positive percentage the middle segments are the largest, and with a negative percentage the outer segments are the largest.

Divide Curve in Unequel Segments_v01.dyn (51.9 KB)

3 Likes

Don’t short yourself!

This is really good as an example of the power of nodes and the type of thinking which is required for nearly computational design efforts. Great work!

2 Likes

Nice!! :smiley:

1 Like