宮城県白石市小原 小原温泉薬師堂 大正5年(1916)
徳竹亜紀子,谷垣美保:宮城県白石市小原地区の算額調査,仙台高等専門学校名取キャンパス研究紀要,第57号,2021.
https://www.jstage.jst.go.jp/article/nitsendainatori/57/0/57_7/_pdf/-char/ja
キーワード:円5個
#Julia #SymPy #算額 #和算 #数学
甲円,丁円,己円に挟まれて戊円がそれぞれに外接している。丁円,戊円,己円の直径がそれぞれ 3 寸,1 寸,2 寸のとき,甲円の直径はいかほどか。

甲円の半径と中心座標を \(r_1,\ (x_1,\ y_1)\)
丁円の半径と中心座標を \(r_2,\ (0,\ 0)\)
戊円の半径と中心座標を \(r_3,\ (0,\ r_2 + r_3)\)
己円の半径と中心座標を \(r_4,\ (0, r_2 + 2r_3 + r_4)\)
とおき,以下の連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms r1::positive, x1::positive, y1::positive, r2::positive, r3::positive, r4::positive
eq1 = x1^2 + y1^2 - (r1 + r2)^2
eq2 = x1^2 + (r2 + r3 - y1)^2 - (r1 + r3)^2
eq3 = x1^2 + (r2 + 2r3 + r4 - y1)^2 - (r1 + r4)^2
res = solve([eq1, eq2, eq3], (r1, x1, y1))[2]; # 2 of 2
# r1: 甲円の半径
ans_r1 = res[1]
@show(ans_r1)
ans_r1 = r3*(r2 + r3)*(r3 + r4)/(r2*r4 - r3^2)
\(\displaystyle \frac{r_{3} \left(r_{2} + r_{3}\right) \left(r_{3} + r_{4}\right)}{r_{2} r_{4} - r_{3}^{2}}\)
ans_r1(r2 => 3//2, r3 => 1//2, r4 => 2//2)
\(\displaystyle \frac{6}{5}\)
# x1: 甲円の中心 x 座標
ans_x1 = res[2]
@show(ans_x1)
ans_x1 = 2*sqrt(r2)*r3*sqrt(r4)*sqrt(r2 + r3)*sqrt(r3 + r4)/(r2*r4 - r3^2)
\(\displaystyle \frac{2 \sqrt{r_{2}} r_{3} \sqrt{r_{4}} \sqrt{r_{2} + r_{3}} \sqrt{r_{3} + r_{4}}}{r_{2} r_{4} - r_{3}^{2}}\)
ans_x1(r2 => 3//2, r3 => 1//2, r4 => 2//2)
\(\displaystyle \frac{6 \sqrt{2}}{5}\)
# y1: 甲円の中心 y 座標
ans_y1 = res[3]
@show(ans_y1)
ans_y1 = (r2^2*r4 + r2*r3*r4 - r3^3 - r3^2*r4)/(r2*r4 - r3^2)
\(\displaystyle \frac{r_{2}^{2} r_{4} + r_{2} r_{3} r_{4} - r_{3}^{3} - r_{3}^{2} r_{4}}{r_{2} r_{4} - r_{3}^{2}}\)
ans_y1(r2 => 3//2, r3 => 1//2, r4 => 2//2)
\(\displaystyle \frac{21}{10}\)
丁円の直径が 3,戊円の直径が 1,己円の直径が 2 のとき,甲円の直径 は 2.4 である。
その他のパラメータは以下のとおりである。
\(r_1 = 1.2,\ x_1 = 1.69706,\ y_1 = 2.1\)
描画関数プログラムのソースを見る
function draw(r2, r3, r4, more=false)
pyplot(size=(400, 400), grid=false, aspectratio=1, showaxis=false, label="", fontfamily="IPAMincho")
r1 = r3*(r2 + r3)*(r3 + r4)/(r2*r4 - r3^2)
x1 = 2*sqrt(r2)*r3*sqrt(r4)*sqrt(r2 + r3)*sqrt(r3 + r4)/(r2*r4 - r3^2)
y1 = (r2^2*r4 + r2*r3*r4 - r3^3 - r3^2*r4)/(r2*r4 - r3^2)
@printf("丁円の直径 = %g; 戊円の直径 = %g; 己円の直径 = %g のとき,甲円の直径 = %g\n", 2r2, 2r3, 2r4, 2r1)
@printf("r1 = %g; x1 = %g; y1 = %g\n", r1, x1, y1)
plot()
circle(0, 0, r2)
circle(0, r2 + r3, r3, :blue)
circle(0, r2 + 2r3 + r4, r4, :green)
circle2(x1, y1, r1, :magenta)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3 # size[2] * fontsize * 2
hline!([0], color=:gray80, lw=0.5)
vline!([0], color=:gray80, lw=0.5)
point(x1, y1, " 甲円:r1,(x1,y1)", :magenta, :center, delta=-delta/2)
point(0, 0, " 丁円:r2,(0,0)", :red, :center, delta=-delta/2)
point(0, r2 + r3, "戊円:r3,(0,r2+r3) ", :black, :right, :vcenter)
point(0, r2 + 2r3 + r4, "己円:r4\n(0,r2+2r3+r4)", :green, :center, delta=-delta/2)
end
end;
draw(3/2, 1/2, 2/2, true)
丁円の直径 = 3; 戊円の直径 = 1; 己円の直径 = 2 のとき,甲円の直径 = 2.4
r1 = 1.2; x1 = 1.69706; y1 = 2.1
以下のアイコンをクリックして応援してください