I am trying to draw a line with 2 points and 2 angles corresponding to a deformed line previously straight (see the image below). Both the coordinates of the points and the angles come from functions. I have tried with matplotlib annotations (with angle3, but doesn't allow variables in AngleA and AngleB and doesn't permit opposite angles) and Bezier curves, but I can't find the way to specify the angles.
Frame made of the deformed lines that I want to draw:

In the following I've assumed that the lines the OP is concerned with are beams loaded only in nodes, justifying the use of cubic splines.
The function
displbelow computes the displaced position of 31 points (possibly overdone) along the line in terms of the undeformed and deformed nodal positions and the nodal rotations, applying an optional scaling factor to the transversal displacements. It returns a(2, 31)array of displaced beam positions in the global coordinate system.To check the correctness of the implementation and show the usage I've written a short program using
displto show 4 arbitrarily deformed shapes.