# Divide polycurve in unequal segments

**URL:** <https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673>\
**Category:** Revit\
**Tags:** geometry\
**Created:** [January 31, 2024, 9:31am UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673 "2024-01-31T09:31:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [January 31, 2024, 9:31am UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/1 "2024-01-31T09:31:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [January 31, 2024, 10:55am UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/2 "2024-01-31T10:55:21Z")

</div>

@MJB-online

> **[Bell Curve](https://www.geogebra.org/m/heapkgz6)**
>
> Bell Curve

> **[The Normal Distribution Curve](https://www.geogebra.org/m/mgxWXVua)**
>
> This worksheet is designed to help students interact with a Gaussian curve. Mean position, Amplitude, and standard deviation can all be dynamically a…

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

KR

Andreas

---

<div class="post-metadata">

**Author:** ![bayowindapo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bayowindapo/32/184532_2.png) [@bayowindapo](https://forum.dynamobim.com/u/bayowindapo)\
**Post date:** [January 31, 2024, 11:31am UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/3 "2024-01-31T11:31:25Z")

</div>

It’s a little messy, but I think it works.  
[Curve.dyn](https://forum.dynamobim.com/uploads/short-url/yPT8M3jS6QLQ2zjKyBwf28cIFmq.dyn) (20.6 KB)

---

<div class="post-metadata">

**Author:** ![bayowindapo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bayowindapo/32/184532_2.png) [@bayowindapo](https://forum.dynamobim.com/u/bayowindapo)\
**Post date:** [January 31, 2024, 11:37am UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/4 "2024-01-31T11:37:36Z")

</div>

Cool effect. What’s this for? 😃

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f5b449290fa5d149f4a6a9d76e8f3a62e2c5d4af.png)

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [February 1, 2024, 7:07am UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/5 "2024-02-01T07:07:50Z")

</div>

Circular or quadratic are possibilities

 ![dividing_lines_2024-02-01_03-04-42](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/1/b1e227387a2b219064a6a116249606a2529299dd.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/6/46535a6d8f6fae911ff1c599ebc6e80a01f2cb02.png)

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [February 1, 2024, 4:25pm UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/6 "2024-02-01T16:25:02Z")

</div>

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](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/8/f89b9c5eee98a99ca8453edbc2a4bfa44d5b3240.png)

[Divide Curve in Unequel Segments\_v01.dyn](https://forum.dynamobim.com/uploads/short-url/jBllvEcay0KGShMjqIJFl3OVlli.dyn) (51.9 KB)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 1, 2024, 5:45pm UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/7 "2024-02-01T17:45:38Z")

</div>

> [@MJB-online](#):
>
> It could probably be done much more elegantly with Designscript or Python

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!

---

<div class="post-metadata">

**Author:** ![bayowindapo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bayowindapo/32/184532_2.png) [@bayowindapo](https://forum.dynamobim.com/u/bayowindapo)\
**Post date:** [February 2, 2024, 11:39am UTC](https://forum.dynamobim.com/t/divide-polycurve-in-unequal-segments/97673/8 "2024-02-02T11:39:45Z")

</div>

Nice!! 😃
