"Best" polyline from curve

unhandled
#22


so to clarify your question, something like this is the overall process? (im seeing it more as a landscape now than a human figure)

  1. point spacing not equal
  2. point distribution driven by curvature
  3. equal number of points on each row
  4. no abrupt changes between rows

v2.gh (165.1 KB)




0 Likes

(Ethan Gross) #23

You got it! And you don’t have to assume the curves are closed.

0 Likes

#24

hmm i think 2 and 3 can contradict each other though. Is constant number of points more important than curvature adaptivity? if not, is this branching condition allowed?

0 Likes

(Ethan Gross) #25

Although the averaging method I used above looks OK, I thought maybe I was losing too much information by assigning all the parameters the same weight, so I added an exponential smoothing piece to @RadovanG’s component, with a damping parameter between one and zero. One gives the arithmetic mean and zero gives a totally unaveraged solution. It’s nice to play with, but when you do, it’s clear that anything other than the straight mean gives way to a lot of variation. I also increased the complexity of my surface to better reflect what I’ve got in mind and assumed a symmetrical shape.

best polyline continued.gh (18.1 KB)

0 Likes

(Ethan Gross) #26

Branching is forbidden!!

0 Likes

(Seghier khaled) #27

is this similar to your idea?

0 Likes

(Ethan Gross) #28

This method adds points when necessary, so the actual number is unknown until the end. It looks like you can tweak the total number by adjusting a tolerance, but that will only work for a particular curve. I guess you can do that for every curve in turn, so they all end up with the same number of points, which is the goal, but that’s beyond my skillset.

1 Like