長野県伊那市羽広 仲仙寺 天保2年(1831)
中村信弥「改訂増補 長野県の算額」県内の算額(P.128)
http://www.wasan.jp/zoho/zoho.html
キーワード:円14個,外円
#Julia #SymPy #算額 #和算 #数学
外円の中に大円を 5 個,中円,小円を 4 個ずつ入れる。小円の径が分かっているときに中円の径を求めよ。

外円の半径と中心座標を \(R,\ (0,\ 0);\ R = 2r_1\)
大円の半径と中心座標を \(r_1,\ (r_1,\ 0)\)
中円の半径と中心座標を \(r_2,\ (x_2,\ x_2)\)
小円の半径と中心座標を \(r_3,\ (0,\ r_1 - r_3)\)
とおき,以下の連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms r1::positive, r2::positive, r3::positive, x2::positive;
eq1 = (r1 - x2)^2 + x2^2 - (r1 -r2)^2
eq2 = 2x2^2 - (r1 - r2)^2
eq3 = r1^2 + (r1 - r3)^2 - (r1 + r3)^2;
res = solve([eq1, eq2, eq3], (r1, r2, x2))[1]
(4*r3, 2*r3*(2 - sqrt(2)), 2*r3)
中円の径 = 2*(2 - sqrt(2))×小円の径 である。術では「4 から 8 の平方根を引いて小円の径を掛ける」である。
小円の径を 5 とすれば,以下のようになる。
2*(2 - sqrt(2))*5, (4 - sqrt(8))*5
(5.857864376269049, 5.857864376269049)
r1 = 20.00000; r2 = 5.85786; r3 = 5.00000; x2 = 10.00000
描画関数プログラムのソースを見る
function draw(r3, more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(r1, r2, x2) = (4*r3, 2*r3*(2 - sqrt(2)), 2*r3)
@printf("r1 = %.5f; r2 = %.5f; r3 = %.5f; x2 = %.5f\n", r1, r2, r3, x2)
plot()
circle(0, 0, 2r1, :black)
circle(0, 0, r1, :red)
circle42(0, r1, r1, :red)
circle42(0, r1 - r3, r3, :blue)
circle4(x2, x2, r2, :green)
if more
point(r1-r3, 0, " r1-r3", :blue, :center)
point(r1, 0, " r1 大円", :red)
point(2r1, 0, " 2r1", :red)
point(x2, x2, "(x2,x2,r2)", :green, :center)
point(x2, x2, "中円", :green, :center, :bottom)
point(0, r1-r3, "小円", :blue)
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
end
end;
以下のアイコンをクリックして応援してください