Grasshopper

algorithmic modeling for Rhino

Hi all,

I've been investigating on the subject of customized (uneven) curve divisions recently. I was especially interested in finding a solution for controlling the "density" of division points on a curve.

What I've come up with is a definition which let's you aply a custom "density function" to a curve and divide it into segments of equal "weigth" rather than length.

The results are satisfactory:


... and quite precise:


However, some parts of the definition are still a bit convoulted.

Any suggestions how to make it simpler?
Has anybody tried other ways to solve similar problems?

I'll be making an attempt to write a VB component which does the same thing and maybe experiment with surfaces, so I'd really apreciate any feedback on this one.

Thanks!

Views: 24723

Attachments:

Replies to This Discussion

Last week I've created a basicly identical definition for curvature-based division (less neat, though :) and stumbled upon the problem you've mentioned:


I think we can get around it by shattering the Curvature-Graph Curve and the Base Curve into segments using the G3-discontinuity points of the latter and finding the closest points for each pair of sub-curves separately:


You should be able to use the same concept in VB.
.ghx attached.
Attachments:
Will have to try that in office tomorrow. Haven't played around much with curvature discontinuities much, so will certainly give it a shot. The issue that To] raised is a serious issue when the curvature gets extreme at certain points, and as seen in Jacek's illustrations above, it can behave oddly at certain points.. perhaps even worse for self intersecting curves.

Another fix that comes to my mind is to not use the closest point logic, but to rather iteratively evaluate curvature at neighbouring points for each point (this would ofcourse need VB), and slide them along the curve based on where ever the curvature is higher. Will do that too and keep you guys posted.
hi jacek,suryansh...according to our discussion, this is our version of curvature graph depending on the curvature of the curve ...best [u and to]

Attachments:

Just came across and saw Ursula's version don't work on new 0.9.0064 version so I upload python component. 

===========================

import rhinoscriptsyntax as rs

import Rhino as rc

a = []

b = []

c = rs.coercecurve(crv)

i = rc.Geometry.Interval(0,1)

rc.Geometry.Curve.Domain.SetValue(c,i)

if (Density span class="s4">2):

    Density == 2

ScaleFactor = -Scale

for i in range(0, Density):

    Normal = crv.CurvatureAt(i/Density)

    Point = crv.PointAt(i/Density)

    a.append(Point)

    b.append(Point + Normal*ScaleFactor)

===========================

Attachments:

Hej kao.gene, very cool. Thank you very much. One very litte improvement ...

for i in range (0, Density+1)

... will include the last segment of the curve.

Thanks a lot! I just updated the components and cleaned some grafts, I'm uploading an updated version of yours.

Attachments:
Hi Suryansh,

Thanks for the feedback and compliment on my work!
I'm also glad we think alike:


The control curves in this example are used to adjust the bulges and z-position of the bridge structure.
I discovered a very quick and simple method of uneven point distribution along a curve you might find useful. The curve is simply offset and a surface is lofted between them. This surface is then unevenly subdivided with the graph mapper. You simply extract the points on the original curve and hide the surface. The same technique is used in the uneven diagrid source file that with the Grasshopper Primer 2.0.

You just have to make sure the loft created is rebuilt to maintain it as a single surface and not a brep.

Great definition!
Attachments:
But why not use the graph mapper to just divide the curve straightaway instead of creating a surface first and then dividing that? The processing of the surface will also make it a costlier operation which can cause significant annoyances when dealing with large amounts of data (say 100+ curves?)..

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service