# Riemann sum with variable lengths of rectangles on a non planar curve

**URL:** <https://discourse.mcneel.com/t/riemann-sum-with-variable-lengths-of-rectangles-on-a-non-planar-curve/141256>\
**Category:** Grasshopper\
**Tags:** windows, curve, math, rhino7\
**Created:** [April 18, 2022, 1:08am UTC](https://discourse.mcneel.com/t/riemann-sum-with-variable-lengths-of-rectangles-on-a-non-planar-curve/141256 "2022-04-18T01:08:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iubaldini](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/iubaldini/32/692577_2.png) [@iubaldini](https://discourse.mcneel.com/u/iubaldini)\
**Post date:** [April 18, 2022, 1:08am UTC](https://discourse.mcneel.com/t/riemann-sum-with-variable-lengths-of-rectangles-on-a-non-planar-curve/141256/1 "2022-04-18T01:08:20Z")

</div>

Hi!

I’m trying to make an stepped ramp, from a non planar curve. To make the steps I thought in a Reimann sum, where the steps are defined by the variable length of the rectangles that approximates to the area under the curve

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/9/5/c95f1dd5f48c849db3caf123474382fe525598b5.jpeg)

That’s a sketch of what I would like to achieve. It has to be known that the ramp it’s made of straight lines, not curves like an spiral staircase.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/5/5/255b7458c0c1a6900291779fe5d984feb3100627.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/3/d/63d61a2b56479d4399251fb3356e364bd8a9c407.jpeg)

I’m inspiring by that staircase from Melopee School by XDGA, where the ramp it’s steeped to have a half more like a normal ladder, and the another half more like a slide or hill

Any help by how to achieve it with grasshopper or another tool it’s welcome!

Thanks!
