Kinematics

I have a project with a carcater done with drawings.
Its an arm in 4 or 5 parts, having comportment such as this lamp for the articulations.

So thinking of 5 quads to put the drawings.

The foot ( in fact the head of the lamp for me) is mouse drawing, and i have in constrain of move and length the ratio of the drawing doing each element.

What would you suggest to do ?

ok seem i have founded for the moment the right tool skeleton animation nodes tutorial