How to divide a surface into different 'height' sections/panels?

What’s the best way to divide a surface up into panels of (all/various) different heights? It’s pretty straightforward to divide up a surface into equal size partitions, but what if I want the heights to be parametrically different? The best thing I can find so far is moving a line multiple times by different amounts and than using that curve to split the surface, which could be okay, but then I’m kinda back at the question of how to make a parametrically varied distribution of those curves, if that makes sense. Let’s say I have a surface that is x’ high. I’d like to be able to specify the number of divisions, but keep the total sum of the divided panels to be exactly x’, while making the distances between the various divisions be different. Does that make any sense without pictures? How do I do this? I feel like there’s a relatively straightforward way to get what I want somehow, but I haven’t been able to find anything about how to do this. Thank you very much!

Anyone have any suggestions? :frowning:

I’ve approximated what I want by using evaluate curve to split up the line in the Z-direction, and used a random numbers component to generate the “random” ‘t’-parameters on the curve. I can then use a number slider attached to the random component’s seed input to get different variations. It works I guess, but it’s a little basic. One thing I’d like to be able to do somehow is specify a minimum and maximum distance between the points on the curve (i.e. so that the subsequently created panels won’t be too thin or too tall). Any ideas on how to do this bit? Thank you very much for any help.

EDIT: I’ll attach the basic gh script I made.
divide line pls.gh (11.0 KB)