Grasshopper

algorithmic modeling for Rhino

Principal curvature lines on surfaces: need some advice please

Hi,

 

To generate a grid structure based on a surface, I wanted to determine the principal curvature lines in a UV-point. This seems more complex than it sounds. Though, there is a Principal curvature component in GH, and it outputs the two values for the principal curvature in that point, and the two orthogonal directions. But how to construct a curve based on that data?

 

Anyone willing to share some experience?

 

I've included a snapshot of the (simple) definition generating a hypar, and a UV-point on that surface.

Also you can find the ghx attached

 

Thanks!

 

Niels

 

more info:

http://en.wikipedia.org/wiki/Principal_curvature

Views: 12166

Attachments:

Replies to This Discussion

Hi Niels,

 

a principal curvature line contains a very large (in a purely mathematical sense, infinite) number of points. The Principal Curvature component only gives you information for a single point. If you want to take the principal direction at that location and 'grow' a complete principal curve, you'll need some form of iteration, which means you'll need to write a VB/C# script.

 

I wrote something that tracks curvature lines along the strongest kappa in a single direction until it hits the surface edge.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Hi David,

 

Thanks for responding quickly. I've looked at your script and tried to dissect it, but could not follow every step. I've tried to connect your script to my previous definition, and this gave some result (see pdf).

However, I don't know how to proceed to 1) get the 'other' end of the curve, going to the opposite edge of the surface. 2) draw or construct the orthogonal principal direction, because I would want to end up with the two principal curvature lines through a certain point.

 

I don't know if you would see a solution to this.

Thanks for any help

 

Niels

Attachments:

I extended the script, it now finds points in both directions, and you can say whether you want to use the minimal or maximal curvature at the sample points. You can also specify a rotation angle to add to each sample, so you can get these curves at 5 degrees off the real maximum curvature.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Ah, attachments.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Attachments:

IT WORKS...thank you!

David. your file works flawlessly. I've connected a hypar surface and a helix to your script, and after introducing some points on the surface, your definition nicely draws the two perpendicular principal curvature lines on the surface.

 

This opens a lot of possibilities, for sure if you check several chapters of Helmut Pottmann's book 'Architectural Geometry'. It is relevant to desiging PQ (plane quadrilateral) meshes, a design topic with a lot of potential, as you know for sure.

 

I am planning on using it to divide a surface as a base for designing deployable structures, my field of expertise. More results later...

see first examples attached...

Q: Could this become a grasshopper standard component for a future build? I think there will be a lot of interest.

 

Anyway, David, and also Chris and Evert: thank you!

 

cheers,

 

Niels

 

Attachments:

If we're going to turn this into a proper component, then I'll need to ask the Seattle math-heads for a better algorithm. Currently the deviation between the sampled curve and the 'real' curve is compounded, which is a $3 way of saying it gets worse all the time and the worse it gets the faster it gets worse still.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Yes, I've noticed that indeed. (supposedly) identical lines, generated by two separate points, are deviating from one another, whereas they should coincide. It is a small error, but it is there. Good for preliminary design though...

 

Would those math-heads be interested in developing such a function in GH, or should I start a facebook page and get 10.000 autographs?

 

Niels

One way would be Modified Euler or RK4 algorithm :)

 

--

[uto]

Hi, I know this is an old thread but just thought someone might appreciate this...

I've modified David Rutten's script (above) implementing Modified Euler and RK4 as suggested above, thanks to both of you. See attached. This should offer more accurate curvature lines.

PS. If anyone has any tips on automatically creating developable strips from this accounting for maximum strip widths and complicated surfaces (including umbilical points: https://en.wikipedia.org/wiki/Umbilical_point ) then please do share! :)

Attachments:

Hi Niels,

Hi David,

Thanks for posting this script! It has been very useful.

I would like to add a functionality: Asymptotic Lines

Asymptotic lines are the curves on a surface with NO NORMAL CURVATURE. They only exist on anticlastic surfaces. On a minimal surface, they lie at 45° to the PC-lines (you can set the angle with David's script).

For any other anticlastic surface, there is a simple calculation, which returns the angle 'alpha' between PC-direction and A-direction. I implemented this using your script.

Have you come across any other tool, which draws PC-Lines more accurately and/or on meshes?

I would be very interested!

Cheers,

Eike

Attachments:

Hi Eike,

very nice work, loved your model at AAG!

There is a reference on conjugate field by Liu et al. that works on meshes. There is a rich literature on how to reconstruct discrete equivalents of lines of curvature on meshes, but the CF approach is more general.

The only thing that is not clear to me is how you handle closed curvature lines with this kind of integration scheme. This rarely occurs for negatively curved surfaces, but it is a common feature of positively curved surfaces that we are used to build (think of domes, like ellipsoids). Without proper closing condition, you will get a spiraling curve instead of a close one (because of all the small errors accumulated during integration).

Regarding integration techniques, you can pick Verlet, RK, Euler, but I have the feeling that in the end, they have similar limitations (you can find a benchmark here for example). For NURBS, it might be possible to find some analytical formula for PC (it's very tricky though).

An interesting case is when you describe you shape with cyclidic nets. Instead of control points, you have a coarse circular mesh, and it is then possible to generate a NURBS patch parametrised by its lines of curvature, so that the UV mesh follows a PC-Line network. This field has been investigated by the team of Alexander Bobenko and also by Helmutt Pottmann (and proposed decades before by Ralph Martin).

Best,

Romain

hi~david 
.
When i tried to use your method to produce principal curvature lines ,I found several lines  have sharp turns.  some angles between pre-vector and next-vector is nearly 90 degree ,which  maybe cause this problems.
.
maybe we can rotate this vectors in a slight angle to produce smooth  principal curvature lines.so i set a point to test my thought.  and i put following codes into yours,but it did work to specific curve. it cannot apply to several curves.
can you give me some advice?
.
thanks a lot!
.
If (Not IsNothing(PrevDir)) Then        
      If (dir.IsParallelTo(PrevDir, 0.5 * Math.PI) < 0) Then   
        dir.Reverse()
      End If 
    if (dir.IsPerpendicularTo(PrevDir,rAngle) then
        dir.rotate( fAngle ,crv.Normal)
    End I
End If

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2020   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service