# Bending with Kangaroo 2 - Is there a more elegant solution than this?

I’m exploring Kangaroo’s bending capabilities, starting from a simple 2D line bend.

My test case is this:

I have a line which I want to bend around a 90 degree arc so that the end of the line moves to the point indicated.

I started out with a simple equal angle goal for my line segments:

which results in a goal-meeting bend, but not the one I want:

I tried adding an angle range goal between the horizontal line to the left and the first segment but I couldn’t get the angle range to work, so I tried some different goals:

Here I constrained my points to a circle and added a direction constraint for the first segment. This gave me the bend I wanted:

But I’d welcome any suggestions for more elegant ways of doing this…

TIA
Jeremy

Simple bending.gh (11.5 KB)
Bending with constrained direction.gh (14.8 KB)

1 Like

Have you tried the rod goal?

Hi Martin,

I actually started with the rod goal, unsuccessfully, and decided I needed to start from the very beginning. Now I know a (tiniest) little bit more I’ll go back and give it another shot. Thanks.

1 Like

I guess my question here would be what do you actually want to simulate/model?

Setting angles between consecutive segments, or constraining points to a circle will give you simple polyline discretizations of arcs that could be more easily modelled without Kangaroo.

One thing it does make sense to use Kangaroo bending for though is to model an elastica curve.
(Raph Levien has a nice introduction to the history of these curves https://www2.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-103.pdf)

This is the shape a thin wire forms when you bend it (here an ancient demo video comparing to a physical test in Kangaroo 1)

If you want an elastica curve with constrained tangents at either end, perpendicular to each other, I think the easiest way is to model it first as a right angle, fix the start and end segments, then relax with a rest angle of 0.

Here’s an example:

elastica_angle.gh (10.6 KB)

1 Like

Hi Daniel,

This is just a start to better my understanding of how Kangaroo works. I aim to extend my learning from 2D to 3D and bend panels.

My ultimate goal is to be able to model a tapered bellows as found on some early 20th Century cameras.

These bellows were formed by folding a single flat sheet of material. The geometry means that the material had to bend in order to close the tube and ever thereafter as the bellows was expanded and contracted. The bellows panels were partially stiffened, restricting free bending to relatively small areas.

I can (and have) easily approximate a bellows form in Rhino. Or I could probably adapt one of your snap through origami examples if all I needed was to form the creases. But, pig-headedly, I want to capture accurately the various distortions that occur as the bellows is manipulated.

Hi Martin, Thanks for the link. I looked at your definition before and, to be honest, it was too complicated for me. Maybe when I understand Kangaroo better I’ll revisit it with more luck. I do have reservations about the panel layout which doesn’t reflect the actual constraints of the physical camera, as imposed by the stiffening. It could be that it is a sufficient approximation for my purpose. I can’t know until I’ve tried the true layout.

It’s an awesome piece of programming though!

Hahaha yes that’s so true. I wish some of the goals could be set up in a more simple way.