以下の内容はhttps://sangaku0418.hatenablog.com/entry/2022/12/22/180827より取得しました。


算額(その0070)

東京都府中市 大國魂神社

http://www2.ttcn.ne.jp/~nagai/sangaku/sangakumondai1.htm
キーワード:円2個,直角三角形,正方形,長方形
#Julia #SymPy #算額 #和算 #数学


直角三角形 ABC 内に正方形,長方形,等円 2 個がある。
AB が 27 寸,BC が 36 寸のとき,等円の直径を求めよ。

図のように記号を定め,方程式を解く。

eq6 が「和算の心(その001)」の「鈎股弦と内接円の径」に基づくものである。

include("julia-source.txt");  # julia-source.txt ソース

using SymPy
@syms R::positive, AB::positive, AE::positive, AD::positive, ae::positive, ad::positive, de::positive, ae::positive;

DE = ae
BD = ae
AB = 27
eq1 = AE - 3//5*AD;
eq2 = ae - 3//5*ad;
eq3 = de - 4//5*ad;
eq4 = AE - DE/de*ae;
eq5 = AD + BD - AB;
eq6 = ae + de - ad - R;

solve([eq1, eq2, eq3, eq4, eq5, eq6], (R, ae, de, ad, AE, AD))[1]

    (8, 12, 16, 20, 9, 15)

等円の径は 8 である。また,正方形の一辺は 12,長方形の長辺は 20,短辺は 4.8 である。

描画関数プログラムのソースを見る

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   (R, ae, de, ad, AE, AD) = (8, 12, 16, 20, 9, 15)
   r = R/2
   cosine, sine = (4, 3) ./ 5
   Ax, Ay = (0, 27)
   Bx, By = (0, 0)
   Cx, Cy = (36, 0)
   plot([Ax, Bx, Cx, Ax], [Ay, By, Cy, Ay], lw=0.5, showaxis=false)
   Dx, Dy = (0, 27 - AD)
   Ex, Ey = AE*cosine, AB - AE*sine
   DE = AD*cosine
   ex, ey = (Ex + DE*cosine, Ey - DE*sine)
   ax, ay = (ex - DE*sine, ey - DE*cosine)
   dx, dy = (ex + de*cosine, ey - de*sine)
   plot!([Ex, Dx, ax, ex, Ex], [Ey, Dy, ay, ey, Ey], color=:black, lw=0.5)
   plot!([ax, ax, dx, dx, ax], [ay, 0, 0, ay, ay], color=:black, lw=0.5)
   circle(r, r, r)
   # 右の等円の中心座標 -- 2辺までの距離が等しいとの方程式を解く
   @syms Ox, Oy
   eq1 = distance(ax, ay, ex, ey, Ox, Oy) - r
   eq2 = distance(dx, dy, ex, ey, Ox, Oy) - r
   res = solve([eq1, eq2])[3]
   circle(res[Ox], res[Oy], r)
   if more
       point(Ax, Ay, "A ", :black, :right)
       point(Bx, By, "B ", :black, :right)
       point(Cx, Cy, " C", :black)
       point(Dx, Dy, "  D", :black)
       point(Ex, Ey, "  E", :black)
       point(ex, ey, "  e", :black)
       point(ax, ay, " a", :black)
       point(dx, dy, "  d", :black)
       point(r, r, "(r,r)", :red, :center)
       point(res[Ox], res[Oy], "(Ox,Oy)", :red, :center)
       point( (Dx + ex)/2, (Dy + ey)/2, "正方形", :center, mark=false)
       point( (ax + dx)/2, dy/2, "長方形", :center, mark=false)
       point(r, 1.5r, "等円", :center, mark=false)
       point(res[Ox], 0.5r + res[Oy], "等円", :center, mark=false)
   end
end;


以下のアイコンをクリックして応援してください




以上の内容はhttps://sangaku0418.hatenablog.com/entry/2022/12/22/180827より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14