Creating a hinge that stays together when moving and animating

Here’s a hinge I set up in Grasshopper. The topic contains a few other examples…

I think you could also use Bongo but I never used it.