以下の内容はhttps://sangaku0418.hatenablog.com/entry/2023/08/15/235057より取得しました。


算額(その0390)

埼玉県あきる野市 二宮神社 寛政6年(1794)

https://yamabukiwasan.sakura.ne.jp/ymbk17.pdf
キーワード:円1個,直角三角形,正方形,斜線
#Julia #SymPy #算額 #和算 #数学


鈎股弦(直角三角形)内に円と正方形が入っている。
股と長弦の和が 201寸6分,鈎と円径(円の直径)と方面(正方形の一辺)の和が 188 寸である。それぞれの長さはいくつか。

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

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

using SymPy

@syms 鈎::positive, 股::positive, 弦::positive, 中鈎::positive,
     短弦::positive, 長弦::positive, 円径::positive, 方面::positive,
     x::positive, y::positive;
eq1 = 股 + 長弦 - 2016//10
eq2 = 鈎 + 円径 + 方面 - 188
eq3 = 中鈎^2 + 短弦^2 - 鈎^2
eq4 = 中鈎^2 + 長弦^2 - 股^2
eq5 = (鈎 - 方面)*(股 - 方面) - 方面^2
eq6 = 長弦 + 短弦 - 弦
eq7 = 鈎 + 股 - 弦 - 円径
eq8 = (鈎 + 股 + 弦)円径/2 - 鈎*股
res = solve([eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8],
   (鈎, 股, 弦, 中鈎, 短弦, 長弦, 円径, 方面))[1]

    (84, 112, 140, 336/5, 252/5, 448/5, 56, 48)

股の長さは 112 寸である。

中鈎と弦の交点の座標 \( (x,\ y)\) を求める。

(鈎, 股, 弦, 中鈎, 短弦, 長弦, 円径, 方面) = (84, 112, 140, 336//5, 252//5, 448//5, 56, 48)
eq9 = x^2 + (鈎 - y)^2 - 短弦^2
eq10 = (股 - x)^2 + y^2 - 長弦^2
solve([eq9, eq10], (x, y))[1]

    (1008/25, 1344/25)

\(鈎 = 84;\  股 = 112;\  弦 = 140;\  中鈎 = 67.2;\  短弦 = 50.4;\  長弦 = 89.6\)
\(円径 = 56;\  方面 = 48;\  x = 40.32;\  y = 53.76\)

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

function draw(more)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   (鈎, 股, 弦, 中鈎, 短弦, 長弦, 円径, 方面) = (84, 112, 140, 336/5, 252/5, 448/5, 56, 48)
   (x, y) = (1008/25, 1344/25)
   @printf("鈎 = %g;  股 = %g;  弦 = %g;  中鈎 = %g;  短弦 = %g;  長弦 = %g;  円径 = %g;  方面 = %g\n", 鈎, 股, 弦, 中鈎, 短弦, 長弦, 円径, 方面)
   @printf("x = %g;  y = %g\n", x, y)
   plot([0, 股, 0, 0], [0, 0, 鈎, 0], color=:black, lw=0.5)
   circle(円径/2, 円径/2, 円径/2)
   rect(0, 0, 方面, 方面, :blue)
   segment(0, 0, x, y, :green)
   if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       point(0, 鈎, "鈎 ", :black, :right, :vcenter)
       point(股, 0, "股", :black, :center, delta=-delta)
       point(方面, 0, "方面", :blue, :center, delta=-delta)
       point(円径/2, 円径/2, "(円径/2,円径/2)", :red, :center, delta=-delta)
       point(x, y, " (x,y)", :green, :left, :bottom)
       point(2x/3, 2y/3, "中鈎", :green, mark=false)
       point(x/2, (鈎 + y)/2, "   短弦 = (0,鈎)〜(x,y)", :black, mark=false)
       point( (股 + x)/2, y/2, "   長弦 = (x,y)〜(股,0)", :black, mark=false)
       point(股/2, 鈎/2, "   弦 = 短弦 + 長弦", :black, mark=false)
       hline!([0], color=:black, lw=0.5)
       vline!([0], color=:black, lw=0.5)
       plot!(xlims=(-8, 120), ylims=(-8, 90))
   end
end;


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




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

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