# How to plot this compound function?

I have a function w1(x1), w2(x2) and w3(x3), u1(x4) and u2(x5). Using these functions, I like to plot the deformed configuration of the structure, below is the undeformed configuration of the structure. I have extracted these functions. How to do this? I tried the Piecewise function but it requires single variable input. u1(x4) and u2(x5) they are in local coordinate. How to transform these into one global coordinate. I have not defined any global coordinate as such. But we can consider w1 coordinates as the global coordinate system. ClearAll["Global*"];
Clear[b]

Y1 = 2*10^11;
L1 = 4;
a1 = 0.1*0.1;
\[Rho]1 = 7850;
Iyy1 = 0.1^4/12;

L2 = 1;
L3 = 1;
\[Rho]2 = \[Rho]1;
\[Rho]3 = \[Rho]1;
Y2 = 10^-5*Y1;
Y3 = 10^-5*Y1;
a2 = a1;

rym1 = Y1/Y2;
rde1 = \[Rho]2/\[Rho]1;
ria = Iyy1/a1;
rym2 = Y1/Y3;
rde2 = \[Rho]3/\[Rho]1;

z = 1;
z = 3;

\[Lambda]1 = N[Sqrt[rym1*rde1*ria*b^4]];
\[Lambda]2 = N[Sqrt[rym2*rde2*ria*b^4]];
w = c*Sin[b*x1] + c*Cos[b*x1] + c*Sinh[b*x1] +
c*Cosh[b*x1];
w = c*Sin[b*(x2)] + c*Cos[b*(x2)] + c*Sinh[b*(x2)] +
c*Cosh[b*(x2)];
w = c*Sin[b*(x3)] + c*Cos[b*(x3)] + c*Sinh[b*(x3)] +
c*Cosh[b*(x3)];
u = c*Cos[\[Lambda]1*x4] + c*Sin[\[Lambda]1*x4];
u = c*Cos[\[Lambda]2*x5] + c*Sin[\[Lambda]2*x5];

(*set of boundary consitions*)
e = w /. x1 -> 0;
e = D[w, {x1, 2}] /. x1 -> 0;
e = w /. x3 -> 0;
e = D[w, {x3, 2}] /. x3 -> L1;
e = u /. x4 -> 0;
e = u /. x5 -> 0;

(*set of compatability conditions*)
e = ((w /. x1 -> z) - (w /. x2 -> 0));
e = ((D[w, {x1, 1}] /. x1 -> z) - (D[w, {x2, 1}] /.
x2 -> 0));
e = ((D[w, {x1, 2}] /. x1 -> z) - (D[w, {x2, 2}] /.
x2 -> 0));
e = ((D[w, {x1, 3}] /. x1 -> z) - (D[w, {x2, 3}] /.
x2 -> 0)) + (((D[u, {x4, 1}]) /. x4 -> L2)/(rym1*ria));
e = ((w /. x1 -> z) - (u /. x4 -> L2));

e = ((w /. x2 -> z) - (w /. x3 -> 0));
e = ((D[w, {x2, 1}] /. x2 -> z) - (D[w, {x3, 1}] /.
x3 -> 0));
e = ((D[w, {x2, 2}] /. x2 -> z) - (D[w, {x3, 2}] /.
x3 -> 0));
e = ((D[w, {x2, 3}] /. x2 -> z) - (D[w, {x3, 3}] /.
x3 -> 0)) + (((D[u, {x5, 1}]) /. x5 -> L2)/(rym2*ria));
e = ((w /. x2 -> z) - (u /. x5 -> L2));

eq = Table[e[i], {i, 1, 16}];
var = Table[c[i], {i, 1, 16}];
R = Normal@CoefficientArrays[eq, var][];
P = Det[R];
Plot[P, {b, 0, 2}]
s1 = NSolve[P == 0 && 0 < b < 10];
s2 = b /. s1;
s3 = s2[]
\[Omega] = Sqrt[(s3^4*Y1*Iyy1)/(\[Rho]1*a1)]
fn = \[Omega]/(2 \[Pi])
nn = Flatten[NullSpace[R /. b -> s3]]
w = (w /. Table[var[[i]] -> nn[[i]], {i, 1, 4}]) /. {b -> s3}
w = (w /. Table[var[[i]] -> nn[[i]], {i, 5, 8}]) /. {b -> s3}
w = (w /. Table[var[[i]] -> nn[[i]], {i, 9, 12}]) /. {b -> s3}
u = (u /. Table[var[[i]] -> nn[[i]], {i, 13, 14}]) /. {b -> s3}
u = (u /. Table[var[[i]] -> nn[[i]], {i, 15, 16}]) /. {b -> s3}

• What problem are you solving? – Alex Trounev Jun 18 '19 at 11:43

Note the laws of local deformations both parallel and perpendicular to each EF, it is sufficient to rototranslate each EF and plot everything by Show:

EFloc = {{{0, 1}, {1, 1}, {-5.41*10^-3, 4.58*10^-1 - 4.58*10^-1 t + 7.94*10^-2 t^4}},
{{1, 1}, {3, 1}, {-5.41*10^-3 + 5.41*10^-3 t, 7.94*10^-2 + t (-1.41*10^-1 + t (3.88*10^-1 + (-3.17*10^-1 + 7.94*10^-2 t) t))}},
{{3, 1}, {4, 1}, {5.41*10^-3, 7.94*10^-2 + t (1.41*10^-1 + t (4.76*10^-1 + (-3.17*10^-1 + 7.94*10^-2 t) t))}},
{{1, 0}, {1, 1}, {-7.94*10^-2 t, (1.24*10^-1 - 1.30*10^-1 t) t^2}},
{{3, 0}, {3, 1}, {-7.94*10^-2 t, t (-1.24*10^-1 + 1.30*10^-1 t^2)}}};

plots = Table[{A, B, {u, v}} = EFloc[[i]];

{dx, dy} = B - A;
L = Sqrt[dx^2 + dy^2];
matrot = {{dx, -dy}, {dy, dx}} / L;

indef = A + matrot.{{t}, {0}};
def = A + matrot.{{t + u}, {0 - v}};
ParametricPlot[{indef, def}, {t, 0, L}],

{i, Length[EFloc]}];

Magnify[Show[plots, Axes -> False, PlotRange -> All], 2]
` 