長野県長野市松代町清野 高源寺観音堂 寛政12年(1800)
中村信弥「改訂増補 長野県の算額」県内の算額(P.66)
http://www.wasan.jp/zoho/zoho.html
キーワード:円2個,半円,長方形,菱形,平卵
#Julia #SymPy #算額 #和算 #数学
平卵(長方形の両端に半円を付けた形)の中に,2 個の合同な菱形を容れる。菱形の中に円が内接している。横幅が 144 寸,縦が 100 寸のとき,菱形の一辺の長さと,内接円の直径はいかほどか。

平卵の横幅,縦を \(a,\ b\)
半円の半径と中心座標を \(R,\ (a/2 - R,\ 0);\ R = b/2\)
菱形の一辺の長さを \(d\)
半円の周上にある菱形の頂点座標を \( (x_0,\ y_0)\)
内接円の半径と中心座標を \(r,\ (x_0,\ 0)\)
とおき,以下の連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms R, x, d, r, x0, y0, a, b
R = b/2
x = a/2 - R
x0 = (x + R)/2
y0 = sqrt(R^2 - (x0 - x)^2) |> simplify
d = sqrt(x0^2 + y0^2) |> simplify;
# 菱形の一変の長さ
@show(d)
d = sqrt(a*b)/2
\(\displaystyle \frac{\sqrt{a b}}{2}\)
横幅が 144 寸,縦が 100 寸のとき,菱形の一辺の長さは 60 寸である。
d(a => 144, b => 100)
\(60\)
eq1 = x0/d - r/y0;
# 内接円の半径
ans_r = solve(eq1, r)[1]
@show(ans_r)
ans_r = a*sqrt(a*(-a + 4*b))/(8*sqrt(a*b))
\(\displaystyle \frac{a \sqrt{a \left(- a + 4 b\right)}}{8 \sqrt{a b}}\)
横幅が 144 寸,縦が 100 寸のとき,円の直径は 57.6 寸である。
ans_r(a => 144, b => 100).evalf()
\(28.8\)
描画関数プログラムのソースを見る
function draw(a, b, more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
d = sqrt(a*b)/2
R = b/2
x = a/2 - R
x0 = (x + R)/2
y0 = sqrt(a*(4b - a))/4
r = a*sqrt(a*(4b - a))/(8sqrt(a*b))
plot([a/2, x0, -x0, -a/2, -x0, x0, a/2],
[0, y0, -y0, 0, y0, -y0, 0], color=:red, lw=0.5)
segment(-x, R, x, R, :blue)
segment(-x, -R, x, -R, :blue)
circle(x, 0, R, :purple, beginangle=-90, endangle=90)
circle(-x, 0, R, :purple, beginangle=90, endangle=270)
circle2(x0, 0, r, :green)
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(a/2, 0, " a/2", :blue, :left, :bottom, delta=delta/2)
point(0, b/2, "b/2", :blue, :center, :bottom, delta=delta/2)
point(x0, y0, " (x0,y0)", :red, :left, :bottom, delta=delta/2)
point(x0, 0, "内接円:r\n(x0,r)", :green, :center, :bottom, delta=delta/2)
point(x, b/2, "(x,b/2)", :blue, :center, delta=-delta)
point(x, 0, "R,(x,0)", :purple, :center, delta=-delta)
end
end;
draw(144, 100, true)
以下のアイコンをクリックして応援してください