\( \DeclareMathOperator{\abs}{abs} \newcommand{\ensuremath}[1]{\mbox{$#1$}} \)
--> | kill(all); |
\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]
--> | ro:1000;g:9.81;d_h:1;db:1;dw:d_h·db; |
\[\]\[\tag{%o1} 1000\]
\[\]\[\tag{%o2} 9.81\]
\[\]\[\tag{%o3} 1\]
\[\]\[\tag{%o4} 1\]
\[\]\[\tag{%o5} 1\]
--> | h:[1,2,3,4,5]; |
\[\]\[\tag{%o6} \left[ 1\mathop{,}2\mathop{,}3\mathop{,}4\mathop{,}5\right] \]
--> | n:h[5]; |
\[\]\[\tag{%o7} 5\]
--> | for i:1 thru 5 step 1 do (P[i]:ro·g·h[i]·dw,display(P[i])); |
\[\]\[{P_1}\mathop{=}9810.0 \]\[{P_2}\mathop{=}19620.0 \]\[{P_3}\mathop{=}29430.0 \]\[{P_4}\mathop{=}39240.0 \]\[{P_5}\mathop{=}49050.0\]
\[\]\[\tag{%o8} \ensuremath{\mathrm{done}}\]
--> | P_all:P[1]+P[2]+P[3]+P[4]+P[5]; |
\[\]\[\tag{%o9} 147150.0\]
--> | h_start:0;h_max:h[5]; |
\[\]\[\tag{%o10} 0\]
\[\]\[\tag{%o11} 5\]
--> | mP_all:P[1]·(h[1]−h_start)+P[2]·(h[2]−h_start)+P[3]·(h[3]−h_start)+P[4]·(h[4]−h_start)+P[5]·(h[5]−h_start); |
\[\]\[\tag{%o12} 539550.0\]
--> | mP_all_down:P[1]·(h_max−h[1])+P[2]·(h_max−h[2])+P[3]·(h_max−h[3])+P[4]·(h_max−h[4])+P[5]·(h_max−h[5]); |
\[\]\[\tag{%o13} 196200.0\]
--> | h_all:mP_all/P_all,numer;h_all_down:mP_all_down/P_all,numer;test:h_all+h_all_down; |
\[\]\[\tag{%o14} 3.6666666666666665\]
\[\]\[\tag{%o15} 1.3333333333333333\]
\[\]\[\tag{%o16} 5.0\]
--> |
digit_floor3(x):=block([digit_all,digit_3], digit_all:x·1000, digit_3:(floor(digit_all))/1000, return (digit_3)); |
\[\]\[\tag{%o17} \mathop{digit\_ floor3}(x)\mathop{:=}\mathop{block}\left( \left[ \ensuremath{\mathrm{digit\_ all}}\mathop{,}{{\ensuremath{\mathrm{digit}}}_3}\right] \mathop{,}\ensuremath{\mathrm{digit\_ all}}\mathop{:}x 1000\mathop{,}{{\ensuremath{\mathrm{digit}}}_3}\mathop{:}\frac{\mathop{floor}\left( \ensuremath{\mathrm{digit\_ all}}\right) }{1000}\mathop{,}\mathop{return}\left( {{\ensuremath{\mathrm{digit}}}_3}\right) \right) \]
--> | h_all:digit_floor3(h_all),numer;h_all_down:digit_floor3(h_all_down),numer; |
\[\]\[\tag{%o18} 3.666\]
\[\]\[\tag{%o19} 1.333\]
--> | label_h_all:sconcat(h_all);label_h_all_dow:sconcat(h_all_dow); |
\[\]\[\tag{%o20} "3.666"\]
\[\]\[\tag{%o21} "h\_ all\_ dow"\]
--> |
fstr3(sW,sS,sU):=block([l,eqq,w,u,my_string], l:sconcat(sS), eqq:sconcat("="), w:string(sW), u:concat(sU), my_string:concat(l,eqq,w,u), return (my_string)); |
\[\]\[\tag{%o22} \mathop{fstr3}\left( \ensuremath{\mathrm{sW}}\mathop{,}\ensuremath{\mathrm{sS}}\mathop{,}\ensuremath{\mathrm{sU}}\right) \mathop{:=}\]
--> | sW:[P[1],P[2],P[3],P[4],P[5],P_all,h[1],h[2],h[3],h[4],h[5],h_all,h_all_down,h[5]]; |
\[\]\[\tag{%o23} \left[ 9810.0\mathop{,}19620.0\mathop{,}29430.0\mathop{,}39240.0\mathop{,}49050.0\mathop{,}147150.0\mathop{,}1\mathop{,}2\mathop{,}3\mathop{,}4\mathop{,}5\mathop{,}3.666\mathop{,}1.333\mathop{,}5\right] \]
--> | sS:['P1,'P2,'P3,'P4,'P5,'P_all,'h1,'h2,'h3,'h4,'h5,'h_all,'h_all_down,'h]; |
\[\]\[\tag{%o24} \left[ \ensuremath{\mathrm{P1}}\mathop{,}\ensuremath{\mathrm{P2}}\mathop{,}\ensuremath{\mathrm{P3}}\mathop{,}\ensuremath{\mathrm{P4}}\mathop{,}\ensuremath{\mathrm{P5}}\mathop{,}\ensuremath{\mathrm{P\_ all}}\mathop{,}\ensuremath{\mathrm{h1}}\mathop{,}\ensuremath{\mathrm{h2}}\mathop{,}\ensuremath{\mathrm{h3}}\mathop{,}\ensuremath{\mathrm{h4}}\mathop{,}\ensuremath{\mathrm{h5}}\mathop{,}\ensuremath{\mathrm{h\_ all}}\mathop{,}\ensuremath{\mathrm{h\_ all\_ down}}\mathop{,}h\right] \]
--> | sU:['N,'N,'N,'N,'N,'N,'m,'m,'m,'m,'m,'m,'m, 'm]; |
\[\]\[\tag{%o25} \left[ N\mathop{,}N\mathop{,}N\mathop{,}N\mathop{,}N\mathop{,}N\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\right] \]
--> | text_string:fstr3(sW[12],sS[12],sU[12]);text_string:fstr3(sW[13],sS[13],sU[13]); |
\[\]\[\tag{%o26} "h\_ all=3.666m"\]
\[\]\[\tag{%o27} "h\_ all\_ down=1.333m"\]
--> | /* fstr_sum(sW,sS,sU,G1,G2):=block([name,eqq,plus,w,u,g1,g2,my_string], ... + 9 hidden lines |
--> | /* fstr_sum(sW[3],sS[3],sU[3],G1,G2); */; |
--> | del1:0.5; |
\[\]\[\tag{%o28} 0.5\]
--> | size1:d_h;x_axis:n+4;y_axis:n+3; |
\[\]\[\tag{%o29} 1\]
\[\]\[\tag{%o30} 9\]
\[\]\[\tag{%o31} 8\]
--> |
draw2d(xrange = [h_start−1,x_axis], yrange = [−1,y_axis], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4c.wxmx", grid = true, proportional_axes=xy, line_width=1,color=black, fill_color = "#DDDDFF", rectangle([−size1/2+h[1],5],[size1/2+h[1],5−size1]), rectangle([−size1/2+h[2],5],[size1/2+h[2],5−(size1·2)]), rectangle([−size1/2+h[3],5],[size1/2+h[3],5−(size1·3)]), rectangle([−size1/2+h[4],5],[size1/2+h[4],5−(size1·4)]), rectangle([−size1/2+h[5],5],[size1/2+h[5],5−(size1·5)]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h[1],5],[h[2],5],[h[3],5],[h[4],5],[h[5],5]]), /* axis */ line_type = solid, color=black,line_width=1, head_both = false, head_length = 0.4, head_angle = 10, vector([0,0],[0,8]), vector([0,0],[7,0]), label(["h[m]",x_axis−3·del1,0−del1]), label(["P[N]",0−del1,y_axis−del1]), color=red, vector([h[1],5],[0,−1]), vector([h[2],5],[0,−2]), vector([h[3],5],[0,−3]), vector([h[4],5],[0,−4]), vector([h[5],5],[0,−5]), label([fstr3(sW[1],sS[1],sU[1]),h[1],n−size1−del1]), label([fstr3(sW[2],sS[2],sU[2]),h[2],n−size1·2−del1]), label([fstr3(sW[3],sS[3],sU[3]),h[3],n−size1·3−del1]), label([fstr3(sW[4],sS[4],sU[4]),h[4],n−size1·4−del1]), label([fstr3(sW[5],sS[5],sU[5]),h[5],n−size1·5−del1]), color=blue, vector([0,n+del1],[h[1],0]), vector([0,n+del1·2],[h[2],0]), vector([0,n+del1·3],[h[3],0]), vector([0,n+del1·4],[h[4],0]), vector([0,n+del1·5],[h[5],0]), color=blue, label([fstr3(sW[7],sS[7],sU[7]),h[1],n+1.5·del1]), label([fstr3(sW[8],sS[8],sU[8]),h[2],n+2.5·del1]), label([fstr3(sW[9],sS[9],sU[9]),h[3],n+3.5·del1]), label([fstr3(sW[10],sS[10],sU[10]),h[4],n+4.5·del1]), label([fstr3(sW[11],sS[11],sU[11]),h[5],n+5.5·del1]), /* size h_all */ color=black, head_both = true, vector([0,n+del1/2],[h_all,0]), label([fstr3(sW[12],sS[12],sU[12]),h_all,n+del1]), /* size h_all_down vector([h_all,n+2*del1],[(h_max-h_all),0]), label([fstr3(sW[13],sS[13],sU[13]),h_max+del1,n+2.7*del1]), */ /* vector P_all */ head_both = false, line_width=4, vector([h_all,n],[0,−3]), label([fstr3(sW[6],sS[6],sU[6]),n+del1,n−1−del1]), points_joined = false, point_size=1.5, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h_all,5]]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",n+2.5,n/2]), label(["Kopanytsia Y (c) 2025",n+3.5,n/2]) )$ |
--> |
draw2d(xrange = [h_start−1,x_axis], yrange = [−1,y_axis], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4c.wxmx", grid = true, proportional_axes=xy, line_width=1,color=black, fill_color = "#DDDDFF", rectangle([−size1/2+h[1],5],[size1/2+h[1],5−size1]), rectangle([−size1/2+h[2],5],[size1/2+h[2],5−(size1·2)]), rectangle([−size1/2+h[3],5],[size1/2+h[3],5−(size1·3)]), rectangle([−size1/2+h[4],5],[size1/2+h[4],5−(size1·4)]), rectangle([−size1/2+h[5],5],[size1/2+h[5],5−(size1·5)]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h[1],5],[h[2],5],[h[3],5],[h[4],5],[h[5],5]]), /* axis */ line_type = solid, color=black,line_width=1, head_both = false, head_length = 0.4, head_angle = 10, vector([0,0],[0,8]), vector([0,0],[7,0]), label(["h[m]",x_axis−3·del1,0−del1]), label(["P[N]",0−del1,y_axis−del1]), color=red, vector([h[1],5],[0,−1]), vector([h[2],5],[0,−2]), vector([h[3],5],[0,−3]), vector([h[4],5],[0,−4]), vector([h[5],5],[0,−5]), label([fstr3(sW[1],sS[1],sU[1]),h[1],n−size1−del1]), label([fstr3(sW[2],sS[2],sU[2]),h[2],n−size1·2−del1]), label([fstr3(sW[3],sS[3],sU[3]),h[3],n−size1·3−del1]), label([fstr3(sW[4],sS[4],sU[4]),h[4],n−size1·4−del1]), label([fstr3(sW[5],sS[5],sU[5]),h[5],n−size1·5−del1]), color=blue, vector([0,n+del1],[h[1],0]), vector([0,n+del1·2],[h[2],0]), vector([0,n+del1·3],[h[3],0]), vector([0,n+del1·4],[h[4],0]), vector([0,n+del1·5],[h[5],0]), color=blue, label([fstr3(sW[7],sS[7],sU[7]),h[1],n+1.5·del1]), label([fstr3(sW[8],sS[8],sU[8]),h[2],n+2.5·del1]), label([fstr3(sW[9],sS[9],sU[9]),h[3],n+3.5·del1]), label([fstr3(sW[10],sS[10],sU[10]),h[4],n+4.5·del1]), label([fstr3(sW[11],sS[11],sU[11]),h[5],n+5.5·del1]), /* size h_all */ color=black, head_both = true, /* vector([0,n+del1/2],[h_all,0]), label([fstr3(sW[12],sS[12],sU[12]),h_all,n+del1]), */ /* size h_all_down */ vector([h_all,n+2·del1],[(h_max−h_all),0]), label([fstr3(sW[13],sS[13],sU[13]),h_max+del1,n+2.7·del1]), /* vector P_all */ head_both = false, line_width=4, vector([h_all,n],[0,−3]), label([fstr3(sW[6],sS[6],sU[6]),n+del1,n−1−del1]), points_joined = false, point_size=1.5, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h_all,5]]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",n+2.5,n/2]), label(["Kopanytsia Y (c) 2025",n+3.5,n/2]) )$ |
--> |
draw2d(xrange = [h_start−1,x_axis], yrange = [−1,y_axis], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4c.wxmx", grid = true, proportional_axes=xy, line_width=1,color=black, fill_color = "#DDDDFF", rectangle([−size1/2+h[1],5],[size1/2+h[1],5−size1]), rectangle([−size1/2+h[2],5],[size1/2+h[2],5−(size1·2)]), rectangle([−size1/2+h[3],5],[size1/2+h[3],5−(size1·3)]), rectangle([−size1/2+h[4],5],[size1/2+h[4],5−(size1·4)]), rectangle([−size1/2+h[5],5],[size1/2+h[5],5−(size1·5)]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h[1],5],[h[2],5],[h[3],5],[h[4],5],[h[5],5]]), /* axis */ line_type = solid, color=black,line_width=1, head_both = false, head_length = 0.4, head_angle = 10, vector([0,0],[0,8]), vector([0,0],[7,0]), label(["h[m]",x_axis−3·del1,0−del1]), label(["P[N]",0−del1,y_axis−del1]), color=red, vector([h[1],5],[0,−1]), vector([h[2],5],[0,−2]), vector([h[3],5],[0,−3]), vector([h[4],5],[0,−4]), vector([h[5],5],[0,−5]), label([fstr3(sW[1],sS[1],sU[1]),h[1],n−size1−del1]), label([fstr3(sW[2],sS[2],sU[2]),h[2],n−size1·2−del1]), label([fstr3(sW[3],sS[3],sU[3]),h[3],n−size1·3−del1]), label([fstr3(sW[4],sS[4],sU[4]),h[4],n−size1·4−del1]), label([fstr3(sW[5],sS[5],sU[5]),h[5],n−size1·5−del1]), color=blue, vector([0,n+del1],[h[1],0]), vector([0,n+del1·2],[h[2],0]), vector([0,n+del1·3],[h[3],0]), vector([0,n+del1·4],[h[4],0]), vector([0,n+del1·5],[h[5],0]), color=blue, label([fstr3(sW[7],sS[7],sU[7]),h[1],n+1.5·del1]), label([fstr3(sW[8],sS[8],sU[8]),h[2],n+2.5·del1]), label([fstr3(sW[9],sS[9],sU[9]),h[3],n+3.5·del1]), label([fstr3(sW[10],sS[10],sU[10]),h[4],n+4.5·del1]), label([fstr3(sW[11],sS[11],sU[11]),h[5],n+5.5·del1]), /* size h_all */ color=black, head_both = true, vector([0,n+del1/2],[h_all,0]), label([fstr3(sW[12],sS[12],sU[12]),h_all,n+del1]), /* size h_all_down */ vector([h_all,n+2·del1],[(h_max−h_all),0]), label([fstr3(sW[13],sS[13],sU[13]),h_max+del1,n+2.7·del1]), /* h_all+ h_all_down =5 size */ points_joined = true, point_size=0.1, line_width=1.0, line_type = solid, points([[h_start,h_start−1],[h_start,h[5]+4·del1]]), points([[h_all,h_start−1],[h_all,h[5]+4·del1]]), points([[h_max,h_start−1],[h_max,h[5]+4·del1]]), vector([h_start,h_start−1.8·del1],[h_max,0]), label([fstr3(sW[14],sS[14],sU[14]),h_max/2,h_start−1.4·del1]), /* vector P_all */ head_both = false, line_width=4, vector([h_all,n],[0,−3]), label([fstr3(sW[6],sS[6],sU[6]),n+del1,n−1−del1]), points_joined = false, point_size=1.5, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h_all,5]]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",n+2.5,n/2]), label(["Kopanytsia Y (c) 2025",n+3.5,n/2]) )$ |
TEST
--> | n;h[5];db; |
\[\]\[\tag{%o35} 5\]
\[\]\[\tag{%o36} 5\]
\[\]\[\tag{%o37} 1\]
--> | P_test:integrate(ro·g·(h[5]−hi)·db,hi,0,n); |
\[\]\[\tag{%o38} 122625.0\]
--> | mP_test:integrate(ro·g·((n−hi)··2)·db,hi,0,n); |
\[\]\[\tag{%o39} 408750.0\]
--> | mP_test_down:integrate(ro·g·(n−hi)·hi·db,hi,0,n); |
\[\]\[\tag{%o40} 204375.0\]
--> | h_D:mP_test/P_test; |
\[\]\[\tag{%o41} 3.3333333333333335\]
--> | h_D_down:mP_test_down/P_test; |
\[\]\[\tag{%o42} 1.6666666666666667\]
--> | Pi(hi,i):=ro·g·(n−dhii·i)·db·dhii; |
\[\]\[\tag{%o43} \mathop{Pi}\left( \ensuremath{\mathrm{hi}}\mathop{,}i\right) \mathop{:=}\ensuremath{\mathrm{ro}} g\, \left( n\mathop{-}\ensuremath{\mathrm{dhii}} i\right) \, \ensuremath{\mathrm{db}}\, \ensuremath{\mathrm{dhii}}\]
--> | sum_P:0; nn:5;dhii:n/nn; |
\[\]\[\tag{%o44} 0\]
\[\]\[\tag{%o45} 5\]
\[\]\[\tag{%o46} 1\]
--> | for i:0 step 1 thru nn do (dP:Pi(dhii,i),sum_P:sum_P+dP); |
\[\]\[\tag{%o47} \ensuremath{\mathrm{done}}\]
--> | sum_P;if sum_P = P_all then display ("Test OK!") else display (" Errors!"); |
\[\]\[\tag{%o48} 147150.0 \]\[\mbox{}\\"Test OK!"\mathop{=}"Test OK!"\]
\[\]\[\tag{%o49} \ensuremath{\mathrm{done}}\]
Simple
--> | kill(all); |
\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]
--> | P:[1.1,2.5,3.4,4.7,6.3];P_max:0;n:5; |
\[\]\[\tag{%o1} \left[ 1.1\mathop{,}2.5\mathop{,}3.4\mathop{,}4.7\mathop{,}6.3\right] \]
\[\]\[\tag{%o2} 0\]
\[\]\[\tag{%o3} 5\]
--> | for i:1 thru n step 1 do (if P_max< P[i] then P_max: P[i] else P_max: P_max); |
\[\]\[\tag{%o4} \ensuremath{\mathrm{done}}\]
--> | P_max; |
\[\]\[\tag{%o5} 6.3\]
--> | h:[1,2,3,4,5];dh:1;h_start:5;x_axis:h_start+dh;y_axis:P_max;n:5;size1:1;del1:1; |
\[\]\[\tag{%o6} \left[ 1\mathop{,}2\mathop{,}3\mathop{,}4\mathop{,}5\right] \]
\[\]\[\tag{%o7} 1\]
\[\]\[\tag{%o8} 5\]
\[\]\[\tag{%o9} 6\]
\[\]\[\tag{%o10} 6.3\]
\[\]\[\tag{%o11} 5\]
\[\]\[\tag{%o12} 1\]
\[\]\[\tag{%o13} 1\]
--> |
digit_floor3(x):=block([digit_all,digit_3], digit_all:x·1000, digit_3:(floor(digit_all))/1000, return (digit_3)); |
\[\]\[\tag{%o14} \mathop{digit\_ floor3}(x)\mathop{:=}\mathop{block}\left( \left[ \ensuremath{\mathrm{digit\_ all}}\mathop{,}{{\ensuremath{\mathrm{digit}}}_3}\right] \mathop{,}\ensuremath{\mathrm{digit\_ all}}\mathop{:}x 1000\mathop{,}{{\ensuremath{\mathrm{digit}}}_3}\mathop{:}\frac{\mathop{floor}\left( \ensuremath{\mathrm{digit\_ all}}\right) }{1000}\mathop{,}\mathop{return}\left( {{\ensuremath{\mathrm{digit}}}_3}\right) \right) \]
--> |
fstr3(sW,sS,sU):=block([l,eqq,w,u,my_string], l:sconcat(sS), eqq:sconcat("="), w:string(sW), u:concat(sU), my_string:concat(l,eqq,w,u), return (my_string)); |
\[\]\[\tag{%o15} \mathop{fstr3}\left( \ensuremath{\mathrm{sW}}\mathop{,}\ensuremath{\mathrm{sS}}\mathop{,}\ensuremath{\mathrm{sU}}\right) \mathop{:=}\]
--> |
NM_k123(P,h,n):=block([P_all,mP,i,N,h_all,Result], N:n, P_all:0, mP:0, for i:1 thru N step 1 do (P_all:P_all+P[i],mP:mP+P[i]·h[i]), h_all:mP/P_all, Result:[P_all,h_all], return (Result)); |
\[\]\[\tag{%o16} \mathop{NM\_ k123}\left( P\mathop{,}h\mathop{,}n\right) \mathop{:=}\]
--> | D:NM_k123(P,h,n);P_all:D[1],numer;h_all:digit_floor3(D[2]),numer; |
\[\]\[\tag{%o17} \left[ 18.0\mathop{,}3.6999999999999997\right] \]
\[\]\[\tag{%o18} 18.0\]
\[\]\[\tag{%o19} 3.699\]
--> | P_all:P[1]+P[2]+P[3]+P[4]+P[5]; |
\[\]\[\tag{%o20} 18.0\]
--> | mP:P[1]·h[1]+P[2]·h[2]+P[3]·h[3]+P[4]·h[4]+P[5]·h[5]; |
\[\]\[\tag{%o21} 66.6\]
--> | h_all:digit_floor3(mP/P_all),numer; |
\[\]\[\tag{%o22} 3.699\]
--> | sW:[P[1],P[2],P[3],P[4],P[5],P_all,h[1],h[2],h[3],h[4],h[5],h_all]; |
\[\]\[\tag{%o23} \left[ 1.1\mathop{,}2.5\mathop{,}3.4\mathop{,}4.7\mathop{,}6.3\mathop{,}18.0\mathop{,}1\mathop{,}2\mathop{,}3\mathop{,}4\mathop{,}5\mathop{,}3.699\right] \]
--> | sS:['P1,'P2,'P3,'P4,'P5,'P_all,'h1,'h2,'h3,'h4,'h5,'h_all]; |
\[\]\[\tag{%o24} \left[ \ensuremath{\mathrm{P1}}\mathop{,}\ensuremath{\mathrm{P2}}\mathop{,}\ensuremath{\mathrm{P3}}\mathop{,}\ensuremath{\mathrm{P4}}\mathop{,}\ensuremath{\mathrm{P5}}\mathop{,}\ensuremath{\mathrm{P\_ all}}\mathop{,}\ensuremath{\mathrm{h1}}\mathop{,}\ensuremath{\mathrm{h2}}\mathop{,}\ensuremath{\mathrm{h3}}\mathop{,}\ensuremath{\mathrm{h4}}\mathop{,}\ensuremath{\mathrm{h5}}\mathop{,}\ensuremath{\mathrm{h\_ all}}\right] \]
--> | sU:['N,'N,'N,'N,'N,'N,'m,'m,'m,'m,'m,'m]; |
\[\]\[\tag{%o25} \left[ N\mathop{,}N\mathop{,}N\mathop{,}N\mathop{,}N\mathop{,}N\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\right] \]
--> |
draw2d(xrange = [−del1,x_axis+3·del1], yrange = [−del1,y_axis+3·del1], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4c.wxmx", grid = true, proportional_axes=xy, line_width=1,color=black, fill_color = "#DDDDFF", rectangle([−size1/2+h[1],y_axis],[size1/2+h[1],y_axis−size1·P[1]]), rectangle([−size1/2+h[2],y_axis],[size1/2+h[2],y_axis−(size1·P[2])]), rectangle([−size1/2+h[3],y_axis],[size1/2+h[3],y_axis−(size1·P[3])]), rectangle([−size1/2+h[4],y_axis],[size1/2+h[4],y_axis−(size1·P[4])]), rectangle([−size1/2+h[5],y_axis],[size1/2+h[5],y_axis−(size1·P[5])]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, /* point_type [bullet, circle, plus, times, asterisk, box, square, triangle, delta, wedge, nabla, diamond, lozenge], */ point_type = filled_down_triangle, /* point_type = filled_circle, */ points([[h[1],y_axis],[h[2],y_axis],[h[3],y_axis],[h[4],y_axis],[h[5],y_axis]]), /* start points */ points_joined = true, color=black, point_size=0.1, line_width=1, line_type = solid, points([[h[1],y_axis],[h[1],y_axis+del1/2]]), points([[h[2],y_axis],[h[2],y_axis+del1]]), points([[h[3],y_axis],[h[3],y_axis+del1·1.5]]), points([[h[4],y_axis],[h[4],y_axis+del1·2]]), points([[h[5],y_axis],[h[5],y_axis+del1·2.5]]), /* the end start points */ point_size=2, point_type = filled_down_triangle, points([[0,y_axis]]), point_type = filled_down_triangle, color=black, points([[h_all,y_axis]]), head_both = false, head_length = 0.4, head_angle = 10, line_width=2, vector([h_all,y_axis],[0,−y_axis/2]), /* h_all ? */ head_both = true, line_width=1, vector([0,y_axis/2+del1],[h_all,0]), label(["h-?",h_all/2,y_axis/2+del1/2]), label(["P-?",h_all+del1/2,y_axis/2+del1/2]), /* axis */ line_type = solid, color=black, line_width=1, head_both = false, head_length = 0.4, head_angle = 10, vector([0,0],[0,y_axis+3·del1]), vector([0,0],[x_axis,0]), label(["h[m]",x_axis/2,−0.5·del1]), label(["P[N]",0−del1/3,y_axis+2.5·del1]), color=red, /* vector([h[1],5],[0,-1]), vector([h[2],5],[0,-2]), vector([h[3],5],[0,-3]), vector([h[4],5],[0,-4]), vector([h[5],5],[0,-5]), */ label([concat(P[1]),h[1],y_axis−size1/2]), label([concat(P[2]),h[2],y_axis−size1/2]), label([concat(P[3]),h[3],y_axis−size1/2]), label([concat(P[4]),h[4],y_axis−size1/2]), label([concat(P[5]),h[5],y_axis−size1/2]), color=black, head_both = true, line_width=0.5, vector([0,y_axis+del1/2],[h[1],0]), vector([0,y_axis+del1],[h[2],0]), vector([0,y_axis+del1·1.5],[h[3],0]), vector([0,y_axis+del1·2],[h[4],0]), vector([0,y_axis+del1·2.5],[h[5],0]), label([concat(h[1]),h[1]−del1/2,y_axis+del1/2]), label([concat(h[2]),h[2]−del1,y_axis+del1]), label([concat(h[3]),h[3]−del1,y_axis+del1·1.5]), label([concat(h[4]),h[4]−del1,y_axis+2·del1]), label([concat(h[5]),h[5]−del1,y_axis+2.5·del1]), /* color=black, head_both = true, vector([0,n+del1/2],[h_all,0]), label([fstr3(sW[12],sS[12],sU[12]),h_all,n+del1]), head_both = false, line_width=4, vector([h_all,n],[0,-2]), label([fstr3(sW[6],sS[6],sU[6]),n+del1,n-1-del1]), points_joined = false, point_size=1.5, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h_all,5]]), GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",x_axis+2·del1,y_axis/2]), label(["Kopanytsia Y (c) 2025",x_axis+2.5·del1,n/2]) )$ |
--> |
draw2d(xrange = [−del1,x_axis+3·del1], yrange = [−del1,y_axis+3·del1], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4c.wxmx", grid = true, proportional_axes=xy, line_width=1,color=black, fill_color = "#DDDDFF", rectangle([−size1/2+h[1],y_axis],[size1/2+h[1],y_axis−size1·P[1]]), rectangle([−size1/2+h[2],y_axis],[size1/2+h[2],y_axis−(size1·P[2])]), rectangle([−size1/2+h[3],y_axis],[size1/2+h[3],y_axis−(size1·P[3])]), rectangle([−size1/2+h[4],y_axis],[size1/2+h[4],y_axis−(size1·P[4])]), rectangle([−size1/2+h[5],y_axis],[size1/2+h[5],y_axis−(size1·P[5])]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, /* point_type [bullet, circle, plus, times, asterisk, box, square, triangle, delta, wedge, nabla, diamond, lozenge], */ point_type = filled_down_triangle, /* point_type = filled_circle, */ points([[h[1],y_axis],[h[2],y_axis],[h[3],y_axis],[h[4],y_axis],[h[5],y_axis]]), /* start points */ points_joined = true, color=black, point_size=0.1, line_width=1, line_type = solid, points([[h[1],y_axis],[h[1],y_axis+del1/2]]), points([[h[2],y_axis],[h[2],y_axis+del1]]), points([[h[3],y_axis],[h[3],y_axis+del1·1.5]]), points([[h[4],y_axis],[h[4],y_axis+del1·2]]), points([[h[5],y_axis],[h[5],y_axis+del1·2.5]]), /* the end start points */ point_size=2, point_type = filled_down_triangle, points([[0,y_axis]]), point_type = filled_down_triangle, color=black, points([[h_all,y_axis]]), /* head_both = false, head_length = 0.4, head_angle = 10, line_width=2, vector([h_all,y_axis],[0,-y_axis/2]), h_all ? head_both = true, line_width=1, vector([0,y_axis/2+del1],[h_all,0]), label(["h-?",h_all/2,y_axis/2+del1/2]), label(["P-?",h_all+del1/2,y_axis/2+del1/2]), */ /* axis */ line_type = solid, color=black, line_width=1, head_both = false, head_length = 0.4, head_angle = 10, vector([0,0],[0,y_axis+3·del1]), vector([0,0],[x_axis,0]), label(["h[m]",x_axis/2,−0.5·del1]), label(["P[N]",0−del1/3,y_axis+2.5·del1]), color=red, /* vector([h[1],5],[0,-1]), vector([h[2],5],[0,-2]), vector([h[3],5],[0,-3]), vector([h[4],5],[0,-4]), vector([h[5],5],[0,-5]), */ label([concat(P[1]),h[1],y_axis−size1/2]), label([concat(P[2]),h[2],y_axis−size1/2]), label([concat(P[3]),h[3],y_axis−size1/2]), label([concat(P[4]),h[4],y_axis−size1/2]), label([concat(P[5]),h[5],y_axis−size1/2]), color=black, head_both = true, line_width=0.5, vector([0,y_axis+del1/2],[h[1],0]), vector([0,y_axis+del1],[h[2],0]), vector([0,y_axis+del1·1.5],[h[3],0]), vector([0,y_axis+del1·2],[h[4],0]), vector([0,y_axis+del1·2.5],[h[5],0]), label([concat(h[1]),h[1]−del1/2,y_axis+del1/2]), label([concat(h[2]),h[2]−del1,y_axis+del1]), label([concat(h[3]),h[3]−del1,y_axis+del1·1.5]), label([concat(h[4]),h[4]−del1,y_axis+2·del1]), label([concat(h[5]),h[5]−del1,y_axis+2.5·del1]), /* answer */ color=blue, head_both = true, vector([0,y_axis/3],[h_all,0]), label([fstr3(sW[12],sS[12],sU[12]),h_all/2,y_axis/3+del1/2]), head_both = false, line_width=4, vector([h_all,y_axis],[0,−y_axis·(4/5)]), label([fstr3(sW[6],sS[6],sU[6]),h_all+1.5·del1,y_axis·(2/5)]), points_joined = false, point_size=1.5, line_width=1.3, line_type = solid, point_type = filled_circle, points([[h_all,y_axis]]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",x_axis+2·del1,y_axis/2]), label(["Kopanytsia Y (c) 2025",x_axis+2.5·del1,n/2]) )$ |
Variants 2
(%i1) | kill(all); |
\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]
(%i6) | G1:1;G2:6;L1:0;L2:8;G:G1+G2;L:13; |
\[\]\[\tag{%o1} 1\]
\[\]\[\tag{%o2} 6\]
\[\]\[\tag{%o3} 0\]
\[\]\[\tag{%o4} 8\]
\[\]\[\tag{%o5} 7\]
\[\]\[\tag{%o6} 13\]
(%i11) | n:L+1;screen_w:L+2;screen_h:G2;screen_down:−4;del1:0.5; |
\[\]\[\tag{%o7} 14\]
\[\]\[\tag{%o8} 15\]
\[\]\[\tag{%o9} 6\]
\[\]\[\tag{%o10} \mathop{-}4\]
\[\]\[\tag{%o11} 0.5\]
(%i13) | mG1:(L−L1)·G1;mG2:(L−L2)·G2; |
\[\]\[\tag{%o12} 13\]
\[\]\[\tag{%o13} 30\]
(%i14) | L3:(mG1+mG2)/G,numer; |
\[\]\[\tag{%o14} 6.142857142857143\]
(%i15) | label_L:sconcat(L3); |
\[\]\[\tag{%o15} "6.142857142857143"\]
(%i16) | fL(L1,L2,G1,G2):=((L−L1)·G1+(L−L2)·G2)/(G1+G2); |
\[\]\[\tag{%o16} \mathop{fL}\left( \ensuremath{\mathrm{L1}}\mathop{,}\ensuremath{\mathrm{L2}}\mathop{,}\ensuremath{\mathrm{G1}}\mathop{,}\ensuremath{\mathrm{G2}}\right) \mathop{:=}\frac{\left( L\mathop{-}\ensuremath{\mathrm{L1}}\right) \, \ensuremath{\mathrm{G1}}\mathop{+}\left( L\mathop{-}\ensuremath{\mathrm{L2}}\right) \, \ensuremath{\mathrm{G2}}}{\ensuremath{\mathrm{G1}}\mathop{+}\ensuremath{\mathrm{G2}}}\]
(%i17) | L3:fL((L1),(L2),G1,G2),numer; |
\[\]\[\tag{%o17} 6.142857142857143\]
(%i19) | size1:sqrt(G1),numer;size2:sqrt(G2),numer; |
\[\]\[\tag{%o18} 1.0\]
\[\]\[\tag{%o19} 2.449489742783178\]
(%i20) |
digit_floor3(x):=block([digit_all,digit_3], digit_all:x·1000, digit_3:(floor(digit_all))/1000, return (digit_3)); |
\[\]\[\tag{%o20} \mathop{digit\_ floor3}(x)\mathop{:=}\mathop{block}\left( \left[ \ensuremath{\mathrm{digit\_ all}}\mathop{,}{{\ensuremath{\mathrm{digit}}}_3}\right] \mathop{,}\ensuremath{\mathrm{digit\_ all}}\mathop{:}x 1000\mathop{,}{{\ensuremath{\mathrm{digit}}}_3}\mathop{:}\frac{\mathop{floor}\left( \ensuremath{\mathrm{digit\_ all}}\right) }{1000}\mathop{,}\mathop{return}\left( {{\ensuremath{\mathrm{digit}}}_3}\right) \right) \]
(%i21) | L3:digit_floor3(L3),numer; |
\[\]\[\tag{%o21} 6.142\]
(%i22) | sW:[G1,G2,G,L1,L2,L3,L]; |
\[\]\[\tag{%o22} \left[ 1\mathop{,}6\mathop{,}7\mathop{,}0\mathop{,}8\mathop{,}6.142\mathop{,}13\right] \]
(%i23) | sS:['G1,'G2,'G,'L1,'L2,'L3,'L]; |
\[\]\[\tag{%o23} \left[ \ensuremath{\mathrm{G1}}\mathop{,}\ensuremath{\mathrm{G2}}\mathop{,}G\mathop{,}\ensuremath{\mathrm{L1}}\mathop{,}\ensuremath{\mathrm{L2}}\mathop{,}\ensuremath{\mathrm{L3}}\mathop{,}L\right] \]
(%i24) | sU:['N,'N,'N,'m,'m,'m,'m]; |
\[\]\[\tag{%o24} \left[ N\mathop{,}N\mathop{,}N\mathop{,}m\mathop{,}m\mathop{,}m\mathop{,}m\right] \]
(%i25) |
str3(sW,sS,sU):=block([l,eqq,w,u,my_string], l:sconcat(sS), eqq:sconcat("="), w:string(sW), u:concat(sU), my_string:concat(l,eqq,w,u), return (my_string)); |
\[\]\[\tag{%o25} \mathop{str3}\left( \ensuremath{\mathrm{sW}}\mathop{,}\ensuremath{\mathrm{sS}}\mathop{,}\ensuremath{\mathrm{sU}}\right) \mathop{:=}\]
(%i26) | str3(sW[1],sS[1],sU[1]); |
\[\]\[\tag{%o26} "G1=1N"\]
(%i29) |
draw2d(xrange = [−2,15], yrange = [−5,6], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4d.wxmx", grid = true, proportional_axes=xy, line_width=4,color=black, fill_color = "#eeeeee", rectangle([−size1/2+L1,−size1/2+L1],[size1/2+L1,size1/2+L1]), rectangle([−size2/2+L2,−size2/2],[size2/2+L2,size2/2]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, point_type = filled_circle, points([[L1,0],[L2,0],[L,0],[L,4]]), label([str3(sW[1],sS[1],sU[1]),L1,−size1/2−del1]), label([str3(sW[2],sS[2],sU[2]),L2,−size2/2−del1]), points_joined = true, point_size=0.5, line_width=1.3, line_type = solid, points([[L1,0],[L1,4],[L2,4],[L2,0],[L2,4],[L,4],[L,0]]), points([[L3,3],[L3,4]]), /* size line vertical */ color=black, points([[0,screen_down],[0,0]]), points([[L2,screen_down+del1/2],[L2,0]]), points([[L,screen_down],[L,0]]), line_type = solid, line_width=1, head_both = true, head_length = 0.4, head_angle = 10, vector([L1,−4],[(L−L1),0]), label([str3((sW[7]−sW[4]),sS[4],sU[4]),(L−L1)/2,screen_down+del1]), vector([L2,−3],[(L−L2),0]), label([str3((sW[7]−sW[5]),sS[5],sU[5]),(L−L2)/2+L2,screen_down+3·del1]), color=red, vector([L3,3],[(L−L3),0]), label(["L3-?",L3+(L−L3)/2,3+del1]), head_both = false, vector([L3,4],[0,3·del1]), label(["G=G1+G2",L3,4.5]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",screen_w−del1,screen_h/2−2]), label(["Kopanytsia Y (c) 2025",screen_w−2.2·del1,screen_h/2−2]) )$ |
(%i31) |
draw2d(xrange = [−2,15], yrange = [−5,6], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4c.wxmx", grid = true, proportional_axes=xy, line_width=4,color=black, fill_color = "#eeeeee", rectangle([−size1/2+L1,−size1/2+L1],[size1/2+L1,size1/2+L1]), rectangle([−size2/2+L2,−size2/2],[size2/2+L2,size2/2]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, point_type = filled_circle, points([[L1,0],[L2,0],[L,0],[L,4]]), label([str3(sW[1],sS[1],sU[1]),L1,−size1/2−del1]), label([str3(sW[2],sS[2],sU[2]),L2,−size2/2−del1]), points_joined = true, point_size=0.5, line_width=1.3, line_type = solid, points([[L1,0],[L1,4],[L2,4],[L2,0],[L2,4],[L,4],[L,0]]), points([[L3,3],[L3,4]]), /* size line vertical */ color=black, points([[0,screen_down],[0,0]]), points([[L2,screen_down+del1/2],[L2,0]]), points([[L,screen_down],[L,0]]), line_type = solid, line_width=1, head_both = true, head_length = 0.4, head_angle = 10, vector([L1,−4],[(L−L1),0]), label([str3((sW[7]−sW[4]),sS[4],sU[4]),(L−L1)/2,screen_down+del1]), vector([L2,−3],[(L−L2),0]), label([str3((sW[7]−sW[5]),sS[5],sU[5]),(L−L2)/2+L2,screen_down+3·del1]), color=red, vector([L3,3],[(L−L3),0]), label([str3((sW[7]−sW[6]),sS[6],sU[6]),L3+(L−L3)/2,3+del1]), head_both = false, vector([L3,4],[0,3·del1]), label([str3(sW[3],sS[3],sU[3]),L3,4.5]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",screen_w−del1,screen_h/2−2]), label(["Kopanytsia Y (c) 2025",screen_w−2.2·del1,screen_h/2−2]) )$ |
--> | L1;L2;L;L3; |
\[\]\[\tag{%o85} 0\]
\[\]\[\tag{%o86} 8\]
\[\]\[\tag{%o87} 13\]
\[\]\[\tag{%o88} 6.142857142857143\]
(%i30) |
draw2d(xrange = [−2,15], yrange = [−5,6], font = "Arial", font_size = 30, title="jh_k123_momentForce_v4d.wxmx", grid = true, proportional_axes=xy, line_width=4,color=black, fill_color = "#eeeeee", rectangle([−size1/2+L1,−size1/2+L1],[size1/2+L1,size1/2+L1]), rectangle([−size2/2+L2,−size2/2],[size2/2+L2,size2/2]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, point_type = filled_circle, points([[L1,0],[L2,0],[L,0],[L,4]]), label(["G1=+1",L1,−size1/2−del1]), label(["G2=+6",L2,−size2/2−del1]), points_joined = true, point_size=0.5, line_width=1.3, line_type = solid, points([[L1,0],[L1,4],[L2,4],[L2,0],[L2,4],[L,4],[L,0]]), points([[L3,3],[L3,4]]), /* size line vertical */ color=black, points([[0,screen_down],[0,0]]), points([[L2,screen_down+del1/2],[L2,0]]), points([[L,screen_down],[L,0]]), line_type = solid, line_width=1, head_both = true, head_length = 0.4, head_angle = 10, vector([L1,−4],[(L−L1),0]), label(["L1",(L−L1)/2,screen_down+del1]), vector([L2,−3],[(L−L2),0]), label(["L2",(L−L2)/2+L2,screen_down+3·del1]), color=red, vector([L3,3],[(L−L3),0]), label(["L3=?",L3+(L−L3)/2,3+del1]), head_both = false, vector([L3,4],[0,3·del1]), label(["G=G1+G2",L3,4.5]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",screen_w−del1,screen_h/2−2]), label(["Kopanytsia Y (c) 2025",screen_w−2.2·del1,screen_h/2−2]) )$ |
--> | kill(all); |
\[\]\[\tag{%o0} \ensuremath{\mathrm{done}}\]
--> | G1:1;G2:6;L1:0.5;L2:8.9;G:G1+G2;L:−1; |
\[\]\[\tag{%o1} 1\]
\[\]\[\tag{%o2} 6\]
\[\]\[\tag{%o3} 0.5\]
\[\]\[\tag{%o4} 8.9\]
\[\]\[\tag{%o5} 7\]
\[\]\[\tag{%o6} \mathop{-}1\]
--> | mG1:(L1+L)·G1;mG2:(L2+L)·G2; |
\[\]\[\tag{%o7} \mathop{-}0.5\]
\[\]\[\tag{%o8} 47.400000000000006\]
--> | L3:(mG1+mG2)/G,numer; |
\[\]\[\tag{%o9} 6.700000000000001\]
--> | fL(L1,L2,G1,G2):=(L1·G1+L2·G2)/(G1+G2); |
\[\]\[\tag{%o10} \mathop{fL}\left( \ensuremath{\mathrm{L1}}\mathop{,}\ensuremath{\mathrm{L2}}\mathop{,}\ensuremath{\mathrm{G1}}\mathop{,}\ensuremath{\mathrm{G2}}\right) \mathop{:=}\frac{\ensuremath{\mathrm{L1}}\, \ensuremath{\mathrm{G1}}\mathop{+}\ensuremath{\mathrm{L2}}\, \ensuremath{\mathrm{G2}}}{\ensuremath{\mathrm{G1}}\mathop{+}\ensuremath{\mathrm{G2}}}\]
--> | fL((L−L1),(L−L2),G1,G2),numer; |
\[\]\[\tag{%o11} \mathop{-}8.700000000000001\]
--> | size1:sqrt(G1),numer;size2:sqrt(G2),numer; |
\[\]\[\tag{%o12} 1.0\]
\[\]\[\tag{%o13} 2.449489742783178\]
--> | del1:0.5; |
\[\]\[\tag{%o14} 0.5\]
--> |
draw2d(xrange = [−2,14], yrange = [−5,6], font = "Arial", font_size = 30, title="jh_k123_momentForce.wxmx", grid = true, proportional_axes=xy, line_width=4,color=black, fill_color = "#eeeeee", rectangle([−size1/2+L1,−size1/2+L1],[size1/2+L1,size1/2+L1]), rectangle([−size2/2+L2,−size2/2],[size2/2+L2,size2/2]), points_joined = false, color=red, point_size=1, line_width=1.3, line_type = solid, point_type = filled_circle, points([[L1,0],[L2,0],[L,0],[L3,4]]), label(["G1=+1",L1,−size1/2−del1]), label(["G2=+6",L2,−size2/2−del1]), points_joined = true, point_size=0.1, line_width=1.3, line_type = solid, points([[L1,0],[L1,4],[L2,4],[L2,0],[L2,4],[L,4],[L,0]]), line_type = solid, color=black,line_width=1, head_both = true, head_length = 0.4, head_angle = 10, vector([L1,−4],[(L−L1),0]), label(["L1",(L−L1)/2,−4+del1/2]), vector([L2,−3],[(L−L2),0]), label(["L2",(L−L2)/2+L2,−3+del1/2]), color=red, vector([L3,3],[(L−L3),0]), label(["L3=?",(L−L3)/2+L3,3+del1]), head_both = false, vector([L3,4],[0,3·del1]), label(["G=G1+G2",L3,4.5]), /* GPL */ font = "Arial", font_size = 16, color = "#0e406e", label_orientation = 'vertical, label(["www.k123.org.ua ",12,1.3]), label(["Kopanytsia Y (c) 2025",12.5,1.3]) )$ |
Created with wxMaxima.
The source of this Maxima session can be downloaded here.