How to approach doing something like Daddy long legs?

Greetings,

I am trying to figure out how Daddy long legs works. Not to clone, but to understand the physics.
I know the head stays horizontal, so it has prevented rotation.

What I'm having most trouble with is creating a whole stiff leg upon changing the leg.

Any ideas?

Thanks

Original thread: https://box2d.org/forum/viewtopic.php?t=9997