46 岩手県一関市舞川字龍ヶ沢 観福寺観音堂 明治34年(1901)
安富有恒:和算—岩手の現存算額のすべて,青磁社,東京都,1987.
http://www.wasan.jp/iwatenosangaku_yasutomi.pdf
キーワード:円6個,梅鉢
#Julia #SymPy #算額 #和算 #数学
大小の円を用いて梅鉢紋を描く。大円,小円の直径が与えられたときに大円と小円の間の距離を求めよ。

注:ここで云う距離は図の緑色の太線の長さであり,大円と小円の中心間距離から大円と小円の半径の和を差し引いたものである。
大円と小円の半径を \(r_1,\ r_2\),中心間距離 を \(l\) とおき,以下の方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms l::positive, r1::positive, r2::positive
eq1 = l*sind(Sym(36)) - r1
res = solve(eq1, l)[1] - (r1 + r2)
res |> println
res |> display
-r1 + 2*sqrt(2)*r1/sqrt(5 - sqrt(5)) - r2

術に出てくる「八分(0.8)」は 8/10 = 4/5 である。
b = (sqrt(sqrt(Sym(8)//Sym(10)) +2) - 1)*r1 - r2

簡約化すると以下のようになる。
b2 = b |> simplify

それぞれの式の見かけは違うが,SymPy で得られた式と同じである。
大円,小円の直径がそれぞれ 5, 2.5 のとき,大円と小円の距離は 0.503254041760200 である。
res(r1 => 2.5, r2 => 1.25).evalf() |> println
b(r1 => 2.5, r2 => 1.25).evalf() |> println
b2(r1 => 2.5, r2 => 1.25).evalf() |> println
0.503254041760200
0.503254041760200
0.503254041760200
描画関数プログラムのソースを見る
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(r1, r2) = (2.5, 1.25)
中心間距離 = 2√2*r1/sqrt(5 - √5)
@printf("大円,小円の直径がそれぞれ %g, %g のとき,大円と小円の距離は %g である。\n", 2r1, 2r2, 中心間距離 - (r1 + r2))
plot()
for i = 0:4
x = 中心間距離*cosd(i*72 + 18)
y = 中心間距離*sind(i*72 + 18)
segment(0, 0, x, y, :green, lw=5)
circlef(x, y, r1, :pink)
circle(x, y, r1, :red)
end
circlef(0, 0, r2, :yellow)
circle(0, 0, r2, :brown)
end;
以下のアイコンをクリックして応援してください