I am trying to use Kangaroo to redraw a curve. The primary constraint is that the angle of any segment on the polyline must be less than a specified angle (e.g. 45 degrees) when compared to the “vertical” (in this case the positive Y direction).
The blue curve is the original curve. The purple curve is the current best attempt I have done at achieving this result, simply by tweening the blue curve with a straight line. The purple curve successfully reduces all the angles to below 45 degrees. The issue with the tweening approach is that it doesn’t give that much consideration to the original curvature of the blue curve, and results in something that is too smoothed overall. It would be nice to have more curvature in the areas that originally had more curvature.
Therefore I have turned to Kangaroo to try and solve this, but can’t quite arrive at the correct combination of goals to achieve it. Based somewhat on this example by @DanielPiker I’ve modified it from using the mesh constraint to using clamp angle, length, anchor, and coplanar goals, but there are still segments well above 45 degrees.
I’m thinking that currently the “length” goal is too restrictive and too much in competition with the clamp angle goal, because actually I don’t care about the length of the segments at all really, I care more about it being as close to the original curve as possible, but the only way I can see of making the polyline act like it is connected is using either length or rod goals.
Sorry if anything is unclear, not super familiar with Kangaroo stuff and I will try and clarify ASAP!
Planar Path Slope Angle Limiting.gh (53.6 KB)

