The calculation method/script of curved surface area and curve length in grasshopper

I am currently studying the calculation method of curved surface area and curve length. There are pre-set functions in the Grasshopper, but these functions are black-boxed, I cannot check the script or the inner logic. Therefore, I want to know the logic and method of calculating the subdivision area and length. Can someone help me? Thank you.

Pls help me

Why no one can help me >_<

I think the methods involve fitting simpler geometry to the curve, and using that simpler geometry to calculate within tolerance. Eg you can fit arcs or polylines to a curve. If this is done with sufficient detail adaptively to curvature you’ll get a pretty good approximation.

Otherwise there might be some clever nurbs calculus to do it. But what makes you think these methods will be revealed to you, and how will it help you?

1 Like

Here is some thorough info about similar problems with Beziers
And an open source NURBS implementation
This book looks pretty useful too.

Are you trying to implement your own NURBS algorithms? Or just curious?

Cheers! I hope to apply these algorithms to my essay. My essay involves the calculation of irregular surface area and perimeter, so I need to describe the methods that I use in the methodology section.
However, to be honest, my knowledge of programming is limited. Although I know that Rhino uses mainly NURBS, my knowledge of calculating the surface area consists only of the MESH algorithm, which subdivides a surface into small flats at a given resolution and adds up the areas of those flats. Anyway, thanks again and I will learn what you provide.

Hi, I don’t know what approach is adopted in Rhino but basically, you need to study a little bit of differential geometry. It’s a vast area but all you need are the following.

-the first fundamental form
-area element
And this one is not related to differential geometry but you need it to compute an integral numerically.
-Gauss quadrature

The script should be the one like the attached. (318.3 KB)