How do I remap curve length to isocurve density?

Hi there!

I have an oval surface with vertical isocurves on it.

and:

I have a list of values for curve length.

but:

I want more isocruves at the domain of the oval curve where vertical isocurve are long, and less where isocurve is short. See screenshot for manual modelling in rhino.

Am I making sense?


Do you have a grasshopper file?

question.gh (33.1 KB)

Yes, thank you for asking!
Hopefully I can describe the problem clearly, as I am trying to control the frequency of how often srf is evaluated along U-direction… Dependent on V-value.

Thank you for reading this advice to “attach all the relevant files” when starting a thread so no one has to ask you for it:

3. Attach minimal versions of all the relevant files

Noticed that the second, non-planar curve is not closed. Is this important? Having 2 closed curves and lofting between them may allow you to evaluate the surface more easily- or at least allow you to loft in GH and stick to a parametric workflow. Right now the surface you’re using to create the isosurface curves is an invalid surface.

Curvature.gh (16.9 KB)

I cooked up a gh file. I hope that it will be useful for you.

1 Like

Here is a play. Spacing is controlled by the two sliders in the blue group while “resolution” is determined by the PFrames ‘N’ input (top left).


crv_remap_2020Dec11a.gh (24.0 KB)

As @rahul1 mentioned, your lower curve is not continuous, making lofting impossible and isocurves irrelevant (why is that word in the title?). It’s also not directly below the upper curve in some places. Both these issues add complications.

P.S. This is the same code but using @akche001’s more carefully constructed curves instead of yours.


crv_remap_2020Dec11b.gh (24.8 KB)

P.P.S. The blue group sliders can be adjusted so that vertical lines are more closely spaced when top and bottom curves are near each other, just the opposite of the spec.

1 Like

Hey @Joseph_Oster,
Hope you’re well!
This is a really nice, tidy definition.
I am not so familiar with function notation, though.
I so far haven’t been able to figure out what “if(x>y,0,x)” is testing for; in particular, I am unclear on the comma-separated part of it.


Any clarity here would be greatly appreciated!

The “comma-separated part of it” is just the way an “if” statement works in GH. It’s a way of saying:

if (x>y) then result=0 else result=x

The logic is a little harder to explain… The ‘D0’ value is the running sum of A/B (the increment value which is the curve length divided by the number of PFrames). It gets reset to zero by the ‘if’ statement each time that sum exceeds the Remap value for that point on the curve (from.List Item). So each zero in the result indicates where a vertical line should remain visible. “Cull” can be a confusing term; in this case it means “keep” while in other contexts it can mean “discard/ignore”.

1 Like

That is brilliant, thanks for taking the time to explain.

I had come to the same thought of needing some “resolution” and had determined that it would take an iterative process to create the relationship between the curve distance and density- this solution is just so much cleaner than anything I was coming up with. Kudos to you!