# Automation process for updating polyline vertices' angles

Hello, any help on this would be really appreciated. I’m trying to edit a polyline such as that the rate of change of the angles at the vertices don’t exceed a certain threshold. Ideally I would be looking to automate this process as there are thousands of polylines. I’m including an image below as to how this would look. The blue line represents the original polyline; the grey line represents the line that would follow the original line as close as possible but not ever going over the angle rate of change limit. Is there a way to do this in Rhino/Grasshopper, I’m fairly new to Rhino/Grasshopper, however after researching online, looks like Rhino/Grasshopper should be able to do it. thank you for the help.

Hello - do the polylines have just a few points like the examples?

-Pascal

Hi Pascal, thank you for the quick reply, yes the lines usually have that many points as shown above. The trick is there’s hundreds/thousands of these lines, looking to find a way to automate changing the angle between the lines so that the rate of change of the angle doesn’t exceed a certain limit, not sure if this is possible with Rhino/Grasshopper

Thank you

It’s a bit of a puzzle to do it iteratively since fixing one may break a neighbor… I’m sure there is a more elegant way than what I am thinking of now… I’ll think some more - I assume you want a solution that leaves all vertices as close as possible to their starting point, and am I right that they must move only in Y?

-Pascal

Thank you again, yes only in the y direction, and yes as close to the original line as possible, but the rate of change is what will govern in this case. (if the rate of change is less than the limit, than the line will match the original, if it exceeds it, it will change to the max limit). Last thing, the x coordinates of the vertices should stay the same between the original and final line.

Thank you,
-Jose