算額(その189)
中村信弥「改訂増補 長野県の算額」
http://www.wasan.jp/zoho/zoho.html
県内の算額1(86)
長野県中野市田上 田上観音堂 文化6年(1809)
第5問 内外2個の菱形により決まる黒の部分の面積が 144 寸(本当は平方寸)
外側,内側の菱形の辺の長さが 17 寸,10 寸のとき共通対角線の長さはいかほどか。
内側の菱形の OB,OA の長さを a,b とする。BC の長さを c とする。
以下の連立方程式を解く。
include("julia-source.txt");
using SymPy
@syms a::positive, b::positive, c::positive
eq1 = a^2 + b^2 - 10^2 # ⊿ AOB についてピタゴラスの定理
eq2 = (a + c)^2 + b^2 - 17^2 # ⊿ AOC についてピタゴラスの定理
eq3 = 2b*(a + c) - 2a*b - 144 # 外側の菱形の面積から内側のひし形の面積を引いたものが黒積
solve([eq1, eq2, eq3], (a, b, c))
1-element Vector{Tuple{Sym, Sym, Sym}}:
(6, 8, 9)
共通対角線の長さは 2b = 16
using Plots
using Printf
function draw(more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(a, b, c) = (6, 8, 9)
plot([15, 0, -a - c, 0, a + c], [0, b, 0, -b, 0], linecolor=:black, linewidth=0.5, seriestype=:shape, fillcolor=:black)
plot!([a, 0, -a, 0, a], [0, b, 0, -b, 0], linecolor=:black, linewidth=0.5, seriestype=:shape, fillcolor=:white)
if more == true
point(0, 0, " O", :green, :left, :bottom)
point(a, 0, " B: a", :cyan, :left, :bottom)
point(a + c, 0, " C: a+c", :red, :left, :bottom)
point(0, b, " A: b", :green, :left, :bottom)
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
segment(a + c, 0, a, 0, :gray, linewidth=1)
segment(-a - c, 0, -a, 0, :gray, linewidth=1)
else
plot!(showaxis=false)
end
end;