埼玉県所沢市下新井 熊野神社 明治6年(1873)
山口正義:毛呂周辺の算額
https://yamabukiwasan.sakura.ne.jp/22moroshuuhen.pdf
キーワード:円2個,外円,正7角形
#Julia #SymPy #算額 #和算 #数学
大円内に正7角形と小円が入っている。大円と小円の直径を与えたときに正7角形の一辺の長さを求めよ。

大円と小円の半径を \(r_0,\ r_1\),正7角径が内接する円の半径を \(r_2\) として,以下の方程式を解く。
当時 \(\sin(\pi/7)\) とか \(\cos(\pi/7)\) をどうやって計算していたのだろうか。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms r0::positive, r1::positive, r2::positive,
x2::positive, y2::positive,
x3::positive, y3::positive,
x4::positive, y4::positive;
eq = 2r1 + r2*(1 + cos(PI/7))- 2r0
res = solve(eq, r2)[1]
res |> println
(2*r0 - 2*r1)/(cos(π/7) + 1)
半径は \(r_2 = 2(r_0 - r_1)/(\cos(\pi/7) + 1)\) である。
一辺の長さは \(2r_2\sin(\pi/7) = 5.477843385363599\)
r0 = 10; r1 = 4
r2 = 2(r0 - r1)/(cos(π/7) + 1)
2r2*sin(π/7)
5.477843385363599
描画関数プログラムのソースを見る
function draw(more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(r0, r1) = (10, 4)
r2 = 2(r0 - r1)/(cos(π/7) + 1)
x =
y =
for (i, θ) = enumerate(π/2:2π/7:5π/2)
append!(x, r2*cos(θ))
append!(y, r2*sin(θ) + r0 - r2)
end
@printf("r2 = %g; r0 = %g; r1 = %g\n", r2, r0, r1)
@printf("正7角径の一辺の長さは %g\n", 2r2*sin(π/7))
plot(x, y, color=:blue, lw=0.5)
circle(0, 0, r0, :black)
circle(0, r1 - r0, r1)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) / 3 # size[2] * fontsize * 2
point(0, r0, " r0", :black, :left, :bottom, delta=delta/2)
point(0, r0 - r2, " r0 - r2", :blue)
point(0, r0-r2*(1+cos(π/7)), " r0-r2*(1+cos(π/7))", :blue, :left, :bottom, delta=delta/2)
point(0, r1 - r0, " r1-r0", :red)
point(0, -2, "")
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
end
end;
以下のアイコンをクリックして応援してください