file D:\_j_knuba_2026\jMAXIMA\jh_Job_ex08a_v6.wxmx
TEST OBJECT OF single operations of the K123
/* add size h_D and coordinate X,Y for cross P_x & P_z */
Умова. Визначити параметри вектору сили гідростатичного тиску на двосегментну ламану поверхню "STU". Нахилена під кутом до горизонту прямокутний елемент поверхні "ST" із висотою H=3м та шириною поверхні B=1м. Вертикальний сегмент поверхні "TU" висотою h1=4м. Координати нахиленого сегменту поверхні: нижня грань поверхні (x0=1, y0=1), координати верхньої грані (x1=5, y1=4). Координата верхньої грані вертикального сегменту (x2=5, y2=8). Висота вертикальної проекції поверхні "SUx" дорівнює різниці координат y2-y0=7.
Тиск на вільній поверхні рідини атмосферний.
Визначити величини горизонтальної та ветрикальної проекцій вектору сумарної сили гідростатичного тиску. Визначити величину сумарного вектору сили тиску. Побудувати епюру вертикальної проекції сили тиску, показати об'єм тела тиску, розрахувати та позначити координату центру тиску (крапка D, координати (X,Y)).
Figure 1:
Diagram
(%i1) kill(all);

\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]

(%i1) load("draw")$
(%i2) fileName:"jh_Job_ex08a_v7.wxmx";

\[\]\[\tag{%o2} "jh\_ Job\_ ex08a\_ v7.wxmx"\]

(%i7) x_right:9; label_left:3; label_vert:1.5; label_URL:0.2; delta_x:4;

\[\]\[\tag{%o3} 9\]

\[\]\[\tag{%o4} 3\]

\[\]\[\tag{%o5} 1.5\]

\[\]\[\tag{%o6} 0.2\]

\[\]\[\tag{%o7} 4\]

(%i17) ro:1000;g:9.81;x0:1;y0:1;x1:x0+delta_x;y1:4;B:1;h1:0;y2:y1+h1;x2:x1;

\[\]\[\tag{%o8} 1000\]

\[\]\[\tag{%o9} 9.81\]

\[\]\[\tag{%o10} 1\]

\[\]\[\tag{%o11} 1\]

\[\]\[\tag{%o12} 5\]

\[\]\[\tag{%o13} 4\]

\[\]\[\tag{%o14} 1\]

\[\]\[\tag{%o15} 0\]

\[\]\[\tag{%o16} 4\]

\[\]\[\tag{%o17} 5\]

(%i20) Hall:y1y0+h1;H:y1y0+h1;Hwater:y1+h1;

\[\]\[\tag{%o18} 3\]

\[\]\[\tag{%o19} 3\]

\[\]\[\tag{%o20} 4\]

VARIANT # 1 (standart)

P_x

(%i22) alpha:atan((y1y0)/(x1x0)),numer;grad_alpha:(180/%pi)·alpha,numer;

\[\]\[\tag{%o21} 0.6435011087932844\]

\[\]\[\tag{%o22} 36.86989764584402\]

(%i25) h_C_x:(Hall/2);w_x:Hall·B;I:(B·Hall··3)/12,numer;

\[\]\[\tag{%o23} \frac{3}{2}\]

\[\]\[\tag{%o24} 3\]

\[\]\[\tag{%o25} 2.25\]

(%i26) p_c:ro·g·h_C_x;

\[\]\[\tag{%o26} 14715.0\]

(%i27) P_x:p_c·w_x;

\[\]\[\tag{%o27} 44145.0\]

(%i29) h_D:h_C_x+(I)/(h_C_x·w_x),numer;h_D_x:Hallh_D+y0;

\[\]\[\tag{%o28} 2.0\]

\[\]\[\tag{%o29} 2.0\]

P_z

(%i30) W1:(((x1x0)·(y1y0))/2)·B;

\[\]\[\tag{%o30} 6\]

(%i31) W2:((x1x0)·(h1))·B;

\[\]\[\tag{%o31} 0\]

(%i32) W:W1+W2;

\[\]\[\tag{%o32} 6\]

(%i33) P_z:(W)·ro·g;

\[\]\[\tag{%o33} 58860.0\]

(%i34) P:sqrt(P_x··2+P_z··2);

\[\]\[\tag{%o34} 73575.0\]

(%i36) phi:atan(P_z/P_x),numer;grad_phi:(180/%pi)·phi,numer;

\[\]\[\tag{%o35} 0.9272952180016122\]

\[\]\[\tag{%o36} 53.13010235415598\]

size plot2d - x1
(%i37) x1_:x1+x_right;

\[\]\[\tag{%o37} 14\]

scale
(%i41) scale_L:P_x;scale_P_x:P_x/scale_L;scale_P_z:P_z/scale_L,numer;scale_P:P/scale_L,numer;

\[\]\[\tag{%o38} 44145.0\]

\[\]\[\tag{%o39} 1.0\]

\[\]\[\tag{%o40} 1.3333333333333333\]

\[\]\[\tag{%o41} 1.6666666666666667\]

Draw
(%i54) h1;Hall;Hwater;H;x1;h_D_x;h_D;scale_P_x;scale_P_z;scale_P_x;P;P_x;P_z;

\[\]\[\tag{%o42} 0\]

\[\]\[\tag{%o43} 3\]

\[\]\[\tag{%o44} 4\]

\[\]\[\tag{%o45} 3\]

\[\]\[\tag{%o46} 5\]

\[\]\[\tag{%o47} 2.0\]

\[\]\[\tag{%o48} 2.0\]

\[\]\[\tag{%o49} 1.0\]

\[\]\[\tag{%o50} 1.3333333333333333\]

\[\]\[\tag{%o51} 1.0\]

\[\]\[\tag{%o52} 73575.0\]

\[\]\[\tag{%o53} 44145.0\]

\[\]\[\tag{%o54} 58860.0\]

Coordinate X, Y
(%i56) W1:(((x1x0)·(y1y0))/2)·B;mW1:W1·((1/3)·(x1x0)+x0);

\[\]\[\tag{%o55} 6\]

\[\]\[\tag{%o56} 14\]

(%i58) W2:(((x1x0)·h1))·B;mW2:W2·(0.5·(x1x0)+x0);

\[\]\[\tag{%o57} 0\]

\[\]\[\tag{%o58} 0\]

(%i59) X:(mW1+mW2)/(W1+W2),numer;

\[\]\[\tag{%o59} 2.3333333333333335\]

(%i61) P1:(((y1y0+h1)/2)·ro·g)·((y1y0+h1)·B);mP1:P1·(((y1y0+h1)·(1/3)));

\[\]\[\tag{%o60} 44145.0\]

\[\]\[\tag{%o61} 44145.0\]

(%i63) P2:(((h1)/2)·ro·g)·((h1)·B);mP2:P2·(Hall(2/3·h1));

\[\]\[\tag{%o62} 0\]

\[\]\[\tag{%o63} 0\]

(%i65) Y:(mP1mP2)/(P1P2);Y:h_D_x;

\[\]\[\tag{%o64} 1.0\]

\[\]\[\tag{%o65} 2.0\]

--> /*   X:x0+(x1-x0)/3; Y:h_D_x;  h1:0  */;
--> /* Definition of a block with local variables  */;
(%i66) ds(r) := block([x, n],
   n:100,
x:r·n,
   x:floor(x),
   x:x/100,
return(x)
)$
(%i71) h_C_x:ds(h_C_x),numer; w_x:ds(w_x),numer; I:ds(I),numer; hi_D:ds(h_D),numer; p_c:ds(p_c),numer;

\[\]\[\tag{%o67} 1.5\]

\[\]\[\tag{%o68} 3\]

\[\]\[\tag{%o69} 2.25\]

\[\]\[\tag{%o70} 2\]

\[\]\[\tag{%o71} 14715\]

(%i75) P_x:ds(P_x),numer; P_z:ds(P_z),numer; P:ds(P),numer; hi_D_x:ds(h_D_x),numer;

\[\]\[\tag{%o72} 44145\]

\[\]\[\tag{%o73} 58860\]

\[\]\[\tag{%o74} 73575\]

\[\]\[\tag{%o75} 2\]

(%i77) alpha_:ds(grad_alpha),numer; phi_:ds(grad_phi),numer;

\[\]\[\tag{%o76} 36.86\]

\[\]\[\tag{%o77} 53.13\]

(%i79) X:ds(X),numer; Y:ds(Y),numer;

\[\]\[\tag{%o78} 2.33\]

\[\]\[\tag{%o79} 2\]

(%i80) H2:y1+h1+3;

\[\]\[\tag{%o80} 7\]

epura
(%i81) b:(2/Hall)·(Hall0.1·y1);

\[\]\[\tag{%o81} 1.7333333333333334\]

(%i83) (2/Hall)·(Hall1·y1);y1;

\[\]\[\tag{%o82} \frac{2}{3}\]

\[\]\[\tag{%o83} 4\]

(%i84) if h1 < 7 then Hall_add:Hall+7 else Hall_add:Hall;

\[\]\[\tag{%o84} 10\]

(%i85) if y0 > 1 then y_bottom:0 else y_bottom:1;

\[\]\[\tag{%o85} \mathop{-}1\]

(%i89) x1_;Hall;Hall_add;x_left:2;

\[\]\[\tag{%o86} 14\]

\[\]\[\tag{%o87} 3\]

\[\]\[\tag{%o88} 10\]

\[\]\[\tag{%o89} 2\]

(%i90) x1_;

\[\]\[\tag{%o90} 14\]

Coordinate phi
(%i92) Xi:Xscale_P_x; Yi:Y+scale_P_z;

\[\]\[\tag{%o91} 1.33\]

\[\]\[\tag{%o92} 3.333333333333333\]

(%i93) (scale_P_z/scale_P_x)=(yY)/(Xx);

\[\]\[\tag{%o93} 1.3333333333333333\mathop{=}\frac{y\mathop{-}2}{2.33\mathop{-}x}\]

(%i94) (Xx)·(scale_P_z/scale_P_x)+Y=y;

\[\]\[\tag{%o94} 1.3333333333333333 \left( 2.33\mathop{-}x\right) \mathop{+}2\mathop{=}y\]

(%i95) fyP(scale_P_z,scale_P_x,X,Y,x):=(Xx)·(scale_P_z/scale_P_x)+Y; /* Vector  */

\[\]\[\tag{%o95} \mathop{fyP}\left( {{\ensuremath{\mathrm{scale\_ P}}}_z}\mathop{,}{{\ensuremath{\mathrm{scale\_ P}}}_x}\mathop{,}X\mathop{,}Y\mathop{,}x\right) \mathop{:=}\left( X\mathop{-}x\right) \frac{{{\ensuremath{\mathrm{scale\_ P}}}_z}}{{{\ensuremath{\mathrm{scale\_ P}}}_x}}\mathop{+}Y\]

(%i97) X;Y;

\[\]\[\tag{%o96} 2.33\]

\[\]\[\tag{%o97} 2\]

(%i98) fyP(scale_P_z,scale_P_x,X,Y,2.5);

\[\]\[\tag{%o98} 1.7733333333333334\]

(%i99) (y1y0)/(x1x0)=(y1y)/(x1x);

\[\]\[\tag{%o99} \frac{3}{4}\mathop{=}\frac{4\mathop{-}y}{5\mathop{-}x}\]

(%i100) (x1x)·((y1y0)/(x1x0))=y1y;

\[\]\[\tag{%o100} \frac{3 \left( 5\mathop{-}x\right) }{4}\mathop{=}4\mathop{-}y\]

(%i101) y=y1(x1x)·((y1y0)/(x1x0));

\[\]\[\tag{%o101} y\mathop{=}4\mathop{-}\frac{3 \left( 5\mathop{-}x\right) }{4}\]

(%i102) fyL(x0,x1,y0,y1,x):=y1(x1x)·((y1y0)/(x1x0)); /* Flat line  */

\[\]\[\tag{%o102} \mathop{fyL}\left( \ensuremath{\mathrm{x0}}\mathop{,}\ensuremath{\mathrm{x1}}\mathop{,}\ensuremath{\mathrm{y0}}\mathop{,}\ensuremath{\mathrm{y1}}\mathop{,}x\right) \mathop{:=}\ensuremath{\mathrm{y1}}\mathop{-}\left( \ensuremath{\mathrm{x1}}\mathop{-}x\right) \frac{\ensuremath{\mathrm{y1}}\mathop{-}\ensuremath{\mathrm{y0}}}{\ensuremath{\mathrm{x1}}\mathop{-}\ensuremath{\mathrm{x0}}}\]

(%i103) fyL(x0,x1,y0,y1,1.7),numer;

\[\]\[\tag{%o103} 1.5250000000000004\]

Coordinates
(%i104) coord_x(n,x0,x1,y0,y1,scale_P_z,scale_P_x,X,Y):=block
([dx,xi,yiC,yiL],
  dx:(x1x0)/n,
  x_i:x0+dx,
  for i:1 step 1 thru n do (yiL:fyL(x0,x1,y0,y1,x_i),yiP:fyP(scale_P_z,scale_P_x,X,Y,x_i), if yiP>yiL then (x_i:x_i+dx) else (x_i:x_i)),
      return (x_i)
);

\[\]\[\tag{%o104} {{\ensuremath{\mathrm{coord}}}_x}\left( n\mathop{,}\ensuremath{\mathrm{x0}}\mathop{,}\ensuremath{\mathrm{x1}}\mathop{,}\ensuremath{\mathrm{y0}}\mathop{,}\ensuremath{\mathrm{y1}}\mathop{,}{{\ensuremath{\mathrm{scale\_ P}}}_z}\mathop{,}{{\ensuremath{\mathrm{scale\_ P}}}_x}\mathop{,}X\mathop{,}Y\right) \mathop{:=}\]

(%i105) X_P:coord_x(100,x0,x1,y0,y1,scale_P_z,scale_P_x,X,Y),numer;

\[\]\[\tag{%o105} 2.360000000000001\]

(%i106) Y_P:fyL(x0,x1,y0,y1,X_P);

\[\]\[\tag{%o106} 2.020000000000001\]

(%i108) X_P:ds(X_P),numer; Y_P:ds(Y_P),numer;

\[\]\[\tag{%o107} 2.36\]

\[\]\[\tag{%o108} 2.02\]

Draw of the Triangle
(%i115) y0;y1;y2;x0;x1;x2;H;

\[\]\[\tag{%o109} 1\]

\[\]\[\tag{%o110} 4\]

\[\]\[\tag{%o111} 4\]

\[\]\[\tag{%o112} 1\]

\[\]\[\tag{%o113} 5\]

\[\]\[\tag{%o114} 5\]

\[\]\[\tag{%o115} 3\]

(%i116) draw2d(
   xrange = [x_left,x1_], /* size picture  x - x1 & y - H1 */
yrange = [y_bottom,Hall_add],
   proportional_axes=xy,
   font      = "Arial",
   font_size = 12,
   grid = true,
   line_width=1,
   color=black,
title = "TEST OBJECT OF single operations of the K123",
     color=red,
    label_orientation = horizontal,
label(["S",x00.4,y00.3]),/* point S */
   label(["T",x1+0.4,y10.3]),/* point T */
   label(["U",x2+0.4,y2+0.3]),/* point U */
   label(["U_x",x0+0.4,y2+0.4]),/* point U1 */
   line_width=1,
   color=black,
    line_type = dashes,
   points_joined = true,
    fill_color = "#ddddee",
     polygon([[x0,y0],[x1,y1],[x1,Hwater],[x0,Hwater],[x0,y0]]), /* W  body of presure P_z */
      line_width=10,
      line_type = solid,
   points_joined = true,
   color=black,
   points([[x0,y0],[x0,y2]]), /* VERTICAL reflect of inclined flat surface  for P_x */
   color=red,
   line_width=10,
      line_type = solid,
   points_joined = true,
   points([[x0,y0],[x1,y1],[x1,y2]]), /* inclined flat surface */
   line_width=1,
   color=green,
   point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
     points([[x0,y0],[x0,y2]]), /*  Points of inclined flat surface  for P_x */
   color=green,
   points([[x0,y0],[x1,y1],[x2,y2]]),
   line_width=1,
   color=black,
    line_type = dashes,
   points_joined = true,
    fill_color = white,
     polygon([[2,y0],[0,Hall],[0,y0],[2,y0]]), /*  Contour all Epura  for P_x */
  line_width=4,
      line_type = solid,
   points_joined = true,
   color=red,
   points([[x0,y0],[x1,y1],[x2,Hwater]]),/* inclined flat surface */
   line_width=1,
   color=black,
    line_type = dashes,
   points_joined = true,
    fill_color = white,
     polygon([[2,y0],[0,Hall+y0],[0,y0],[2,y0]]), /* rectangle epura of presure P_x */
   fill_color = "#ddddee",
    line_type = solid,
     polygon([[2,y0],[0,y2],[0,y0],[2,y0]]), /* rectangle epura of presure P_x */
    /* Epura  */
   color = "blue",
   line_width=1,
   line_type = solid,
   head_angle = 10,
   head_length = 0.15,
   vector([(2/Hall)·(Hall0.1·H),0.1·H+y0],[(2/Hall)·(Hall0.1·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.2·H),0.2·H+y0],[(2/Hall)·(Hall0.2·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.3·H),0.3·H+y0],[(2/Hall)·(Hall0.3·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.4·H),0.4·H+y0],[(2/Hall)·(Hall0.4·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.5·H),0.5·H+y0],[(2/Hall)·(Hall0.5·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.6·H),0.6·H+y0],[(2/Hall)·(Hall0.6·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.7·H),0.7·H+y0],[(2/Hall)·(Hall0.7·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.8·H),0.8·H+y0],[(2/Hall)·(Hall0.8·H),0]), /* horizontal presure vector p  */
   vector([(2/Hall)·(Hall0.9·H),0.9·H+y0],[(2/Hall)·(Hall0.9·H),0]),/* horizontal presure vector p  */
   color = "black",
fill_color = light_blue,
   line_width=2,
   head_angle = 15,
   head_length = 0.25,
   color=red,
   point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
  points([[x0,h_D_x]]), /*  point D_{x} on vertical  reflect */
   color=blue,
    label_orientation = horizontal,
label(["P_x",X0.8,Y+0.4]),/* point P_x */
line_width=1,
   line_type = dashes,
   head_angle = 180,
   vector([2,Y],[3·y1,0]), /* horizontal line dot to vector P  */
   color = "blue",
   line_width=3,
   line_type = solid,
   head_angle = 15,
   head_length = 0.25,
   vector([Xscale_P_x,Y],[+scale_P_x,0]), /* horizontal vector P_x  */
   label_orientation = horizontal,
   label_alignment = left,
   /*   Input data   */
   color = "#0e406e",
   label([concat("file:", string(fileName)), x0, Hall_add1.5]),
   label([concat("x0=", string(x0)), x0, Hall_add2]),
   label([concat("y0=", string(y0)), x0, Hall_add2.5]),
   label([concat("x1=", string(x1)), x0, Hall_add3.0]),
   label([concat("y1=", string(y1)), x0, Hall_add3.5]),
   label([concat("alpfa=", string(alpha_)), x0, Hall_add4.0]),
   label([concat("phi=", string(phi_)), x0, Hall_add4.5]),
   label([concat("h_{1}=: ", string(h1)," m"), x0, Hall_add5]),
color = black,
        label([concat("h_{C_{x}}=: ", string(h_C_x)," m"), x1_label_left, y1·2.2]),
   label([concat("w_{x}=: ", string(w_x)," m"), x1_label_left, y1·2]),
   label([concat("p_{c}=: ", string(p_c)," Pa"), x1_label_left, y1·1.8]),
   label([concat("I=: ", string(I)," m"), x1_label_left, y1·1.6]),
    label([concat("h_D=: ", string(hi_D)," m"), x1_label_left, y1·1.4]),
    label([concat("h_D_{coord}=: ", string(hi_D_x)," m"), x1_label_left, y1·1.2]),
   label([concat("P_{x}=: ", string(P_x)," N"), x1_label_left, y1·1]),
    label([concat("P_{z}=: ", string(P_z)," N"), x1_label_left, y1·0.8]),
   color=red,
   label([concat("P=: ", string(P)," N"), x1_label_left, y1·0.6]),
   label([concat("X_{P}=: ", string(X_P)," m"), x1_label_left, y1·0.4]),
   label([concat("Y_{P}=: ", string(Y_P)," m"), x1_label_left, y1·0.2]),
  line_type = solid,
  color=black,
   line_width=1,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
   vector([x1+scale_P_x+0.1,0],[0,h_D_x]),/* h_D_x */
   label_alignment = center,
   label_orientation = vertical,
   font_size = 8,
label([concat("h_{D_{crd}}=: ", string(hi_D_x)," m"), x1+0.7, h_D_x·0.6]),   /* Input data */
    vector([x1+scale_P_x+0.1,Y],[0,HwaterY]),/* h_D */
   label_alignment = center,
   label_orientation = vertical,
   font_size = 8,
label([concat("h_{D}=: ", string(hi_D)," m"), x1+0.7, Y+(HwaterY)/2]),   /* Input data */
line_type = solid,
  color=blue,
   line_width=4,
   head_angle = 180,
  vector([x_left,Hwater],[x1+x_left,0]), /* horizontal line dot to vector P_x  */
   line_width=1,
   line_type = dashes,
   head_angle = 180,
   vector([x0,y1],[x1+x_left,0]), /* horizontal line dot size H  */
   line_type = solid,
  color=black,
   line_width=1,
   line_type = solid,
  head_both = true,
  head_length = 0.2,
  head_angle = 10,
   vector([x1+1.5·x_left0.2,y0],[0,y1y0]), /*  vertical line size H */
   vector([x1+1.5·x_left0.2,y1],[0,h1]), /* vertical line size h1 */
   vector([x1+2·x_left0.2,y0],[0,Hall]), /* vertical line size Hall */
  label_alignment = center,
   label_orientation = vertical,
   font_size = 10,
label([concat("H=: ", string((y1y0))," m"), x1+1.5·x_left0.5, (y0+(y1y0)/2)]), /* vertical  size H */
   label([concat("h_{1}=: ", string((h1))," m"), x1+1.5·x_left0.5, (y1+(h1)/2)]), /* vertical  size H */
   label([concat("Hall=: ", string(Hall)," m"), x1+2·x_left0.5, Hall·0.6]), /* vertical  size Hall */
line_type = solid,
  color=blue,
   line_width=1,
   line_type = solid,
  head_both = false,
  head_length = 0.2,
  head_angle = 10,
   vector([x0x_left/2,Hwater+0.5],[0,0.4]), /* vector p_a */
   font_size = 12,
  color = "#0e406e",
   label_orientation = horizontal,
label(["p_{a} ", x0x_left/20.4,Hwater+0.5]),
   label(["D_{x} ", x0+0.5,hi_D_x0.2]),
   /* Vector P */
    font_size = 12,
   label_alignment = 'left,
   color = red,
   label([concat("D ( ", string(X_P),", ",string(Y_P),") "), X_P+0.3,Y_P0.2]),
    font_size = 8,
   color=black,
   label([concat(" ( ", string(X),", ",string(Y),") "), X+0.1,Y+0.1]),
  color=black,
   point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
  points([[X,Y],[x0,y0],[x1,y1],[x2,y2]]),
     /*dot direct line of  VECTOR P  */
  line_type = solid,
  color=black,
   line_width=1,
   line_type = short_long_dashes,
   vector([X2·scale_P_x,Y+2·scale_P_z],[3·scale_P_x,3·scale_P_z]), /* vectorP */
   line_width=2,
   line_type = solid,
   vector([2,0],[x1_2,0]), /* Axis 0X */
   /* VECTOR P  */
  line_type = solid,
  color=red,
   line_width=3,
   line_type = solid,
  head_both = false,
  head_length = 0.3,
  head_angle = 10,
   vector([Xscale_P_x,Y+scale_P_z],[scale_P_x,scale_P_z]), /* vectorP */
   color = red,
   label_orientation = horizontal,
label(["P ", Xscale_P_x0.5,Y+0.9]),
   /*   Vector P_z  */
   color = blue,
   label_orientation = vertical,
   label(["P_{z} ", X0.3,Y+0.8]),
   vector([X,Y+scale_P_z],[0,scale_P_z]), /* vector P_z */
   line_width=1,
   color=black,
    line_type = short_long_dashes,
   points_joined = true,
   polygon([[X,0],[X,Hwater+0.3]]),
   line_type = dots,
   polygon([[x1,0],[x1,y1]]),
  polygon([[Xscale_P_x,y0],[Xscale_P_x,Hall]]),
   polygon([[x0,Y+scale_P_z],[X+0.3,Y+scale_P_z]]),
   polygon([[x1,Hwater],[x1+4,Hwater]]),
   polygon([[x_left,y0],[x1_,y0]]),
   line_type = solid,
   color = black,
   line_width=2,
   ellipse(x0, y0, 0.75, 0.75, 0, alpha_),
   ellipse(Xi, Yi, 0.4, 0.4, 2, phi_+2),
   label_orientation = horizontal,
    label([concat("alpfa= ", string(alpha_)), x0+1.1,y0+0.3]),
   label([concat("phi= ", string(phi_)), Xi+0.1,Yi+0.4]),
   /* Малюємо прямокутник під текст */
fill_color = "#F6F7EC",
color      = "#819896",
rectangle([x1_x_right/2,Hall_add], [x1_,Hall_add4·label_URL]),
   font      = "Arial",
   font_size = 18,
  color = "#0e406e",
   label_orientation = horizontal,
label(["www.k123.org.ua ", x1_x_right/2,Hall_addlabel_URL]),
  label(["Kopanytsia Y (c)  2026", x1_x_right/2,Hall_add3·label_URL]),
   line_width=1,
   point_type = filled_circle,
  point_size = 1.5,
  points_joined = false,
  color=black,
   points([[X_P,Y_P]]),
  color = red,
   label_orientation = horizontal,
label([string(X),2,Y+0.1]),
   label([string(Y),X,0+0.2])
)$
Figure 2:
Diagram
Варіант 2. Вертикальна секція "TU" відсутня, h1=0.
Figure 3:
Diagram

Created with wxMaxima.

The source of this Maxima session can be downloaded here.