長野県中野市田上 田上観音堂 文化6年(1809)
中村信弥「改訂増補 長野県の算額」県内の算額(P.89)
http://www.wasan.jp/zoho/zoho.html
キーワード:円8個,外円,正三角形
#Julia #SymPy #算額 #和算 #数学
問2. 大円の中に甲,乙,丙,丁を容れる。それぞれは互いに隣同士の円は外接し,大円に内接する正三角形の底辺及び大円に接している。大円の径が 196 寸,丙円の径が 17寸6分5厘のとき,丁円の径はいかほどか。
大円の半径と中心座標を \(R,\ (0,\ 0)\)
甲円の半径と中心座標を \(r_1,\ (0,\ -R/2-r_1)\)
乙円の半径と中心座標を \(r_2,\ (x_2,\ -R/2-r_2)\)
丙円の半径と中心座標を \(r_3,\ (x_3,\ -R/2-r_3)\)
丁円の半径と中心座標を \(r_4,\ (x_4,\ -R/2-r_4)\)
とおき,以下の連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms R::positive, r1::positive, x2::positive, r2::positive, x3::positive, r3::positive, x4::positive, r4::positive;
R = 19600
r3 = 1764
eq1 = x2^2 + (r1 - r2)^2 - (r1 + r2)^2
eq2 = (x3 - x2)^2 + (r2 - r3)^2 - (r2 + r3)^2
eq3 = (x4 - x3)^2 + (r3 - r4)^2 - (r3 + r4)^2
eq4 = x2^2 + (R//2 + r2)^2 - (R - r2)^2
eq5 = x3^2 + (R//2 + r3)^2 - (R - r3)^2
eq6 = x4^2 + (R//2 + r4)^2 - (R - r4)^2
res = solve([eq1, eq2, eq3, eq4, eq5, eq6], (r1, r2, r4, x2, x3, x4))[1] # 1 of 4
(4900, 3675, 675, 4900*sqrt(3), 7840*sqrt(3), 9100*sqrt(3))
\(r_1 = 4900,\ r_2 = 3675,\ r_4 = 675\)
\(x_2 = 8487.04896,\ x_3 = 13579.27833,\ x_4 = 15761.66235\)
丙円の半径は \(r_4 = 675\),もとの単位でいえば丙円の直径は 6寸7分5厘 である。
描画関数プログラムのソースを見る
function draw(more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(r1, r2, r4, x2, x3, x4) = res[1]
@printf("r1 = %.5f, r2 = %.5f, r4 = %.5f, x2 = %.5f, x3 = %.5f, x4 = %.5f\n", r1, r2, r4, x2, x3, x4)
plot([√3R/2, 0, -√3R/2, √3R/2], [-R/2, R, -R/2, -R/2], color=:blue, lw=0.5)
circle(0, 0, R, :black)
circle(0, -R/2 - r1, r1, :blue)
circle2(x2, -R/2 - r2, r2, :green)
circle2(x3, -R/2 - r3, r3, :brown)
circle2(x4, -R/2 - r4, r4, :red)
if more
point(0, -R, " -R")
point(0, -R/2, " -R/2", :green, :left, :bottom)
point(0, -R/2-r1, " 甲")
point(x2, -R/2-r2, " 乙")
point(x3, -R/2-r3, " 丙")
point(x4, -R/2-r4, " 丁")
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
end
end;
以下のアイコンをクリックして応援してください