算額(その426)
長野県東筑摩郡筑北村青柳 碩水寺豊川稲荷社 慶応4年(1868)
中村信弥(1999):算額への招待
http://www.wasan.jp/syotai/syotai.html
等脚台形内に中円が内接している。大円,小円の直径は等脚台形の下底と上底に等しい。それぞれの円の中心は等脚台形の右下角,右上角にあり,互いに接している。中円,小円の直径がそれぞれ 6 寸,4 寸のとき,大円の直径を求めよ。
大円の半径,中心座標を r1, (r1, 0)
中円の半径,中心座標を r2, (0, r2)
小円の半径,中心座標を r3, (r3, 2r2)
とおき,以下の方程式を解く。
include("julia-source.txt");
using SymPy
@syms r1::positive, r2::positive, r3::positive;
eq1 = (r1 - r3)^2 + (2r2)^2 - (r1 + r3)^2
res = solve([eq1], (r1))
Dict{Any, Any} with 1 entry:
r1 => r2^2/r3
大円の半径は,中円の半径の2乗を小円の半径で割って得られる。
中円,小円の半径,が 3 寸,2 寸のとき,大円の半径は 9/2 寸であり,直径は 9 寸である。
res[r1](r2 => 3, r3 => 2) |> println
9/2
using Plots
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(r2, r3) = (6, 4) ./ 2
r1 = r2^2/r3
@printf("r1 = %g; r2 = %g; r3 = %g\n", r1, r2, r3)
@printf("大円の直径 = %g\n", 2r1)
plot([r1, r3, -r3, -r1, r1], [0, 2r2, 2r2, 0, 0], color=:black, lw=0.5)
circle(r1, 0, r1)
circle(0, r2, r2, :blue)
circle(r3, 2r2, r3, :green)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) / 3 # size[2] * fontsize * 2
point(r1, 0, "大円:r1,(r1,0)", :red, :center, :top, delta=-delta)
point(0, r2, "中円:r2,(0,r2) ", :blue, :right, :vcenter)
point(r3, 2r2, "小円:r3,(r3,2r2)", :green, :center, :bottom, delta=delta)
vline!([0], color=:black, lw=0.5)
hline!([0], color=:black, lw=0.5)
else
plot!(showaxis=false)
end
end;
※コメント投稿者のブログIDはブログ作成者のみに通知されます