裏 RjpWiki

Julia ときどき R, Python によるコンピュータプログラム,コンピュータ・サイエンス,統計学

算額(その819)

2024年03月29日 | Julia

算額(その819)

宮城県栗原市瀬峰泉谷 瀬峰泉谷熊野神社奉納算額
徳竹亜紀子,谷垣美保,萬伸介:瀬峰泉谷熊野神社奉納算額をめぐる諸問題,仙台高等専門学校名取キャンパス 研究紀要 第60号(2024)

https://www.sendai-nct.ac.jp/natori-library/wp/wp-content/uploads/2024/03/kiyo2024-1.pdf

正三角形内に円弧(弧背),甲円,乙円を入れる。乙円の直径が 2 寸のとき,円弧が最大(最長)になるときの甲円の直径はいかほどか。

甲円の半径と中心座標を r1, (0, r1)
乙円の半径と中心座標を r2, (x2, r2)
円弧がその一部である円の半径と中心座標を r0, (2r1 - r0, 0)
二等辺三角形の一辺の長さと高さを a, √3a
とおき,以下の連立方程式を解く。

なお,円弧が最大というのは,円弧が斜辺に接する状態である。図では ∠BAH が直角である。AB = r0

include("julia-source.txt");
# julia-source.txt ソース https://blog.goo.ne.jp/r-de-r/e/ad3a427b84bb416c4f5b73089ae813cf

using SymPy

@syms a::positive, r0::positive, r1::positive,
     r2::positive, x2::positive

r0 = √Sym(3)a - 2r1
eq1 = 2r1 - (sqrt(Sym(3))a - 3r1)
eq2 = x2^2 + (r1 - r2)^2 - (r1 + r2)^2
eq3 = x2^2 + (r2 - 2r1 + r0)^2 - (r0 - r2)^2;

res = solve([eq1, eq2, eq3], (r1, a, x2))

   1-element Vector{Tuple{Sym{PyCall.PyObject}, Sym{PyCall.PyObject}, Sym{PyCall.PyObject}}}:
    (3*r2/2, 5*sqrt(3)*r2/2, sqrt(6)*r2)

甲円の直径は乙円の直径の 3/2 = 1.5 倍である。
乙円の直径が 2 寸なら,甲円の直径は 3 寸である。

その他のパラメータは以下のとおりである。

r1 = 1.5;  a = 4.33013;  x2 = 2.44949;  r0 = 4.5

function draw(more)
    pyplot(size=(500, 500), grid=false, showaxis=true, aspectratio=1, label="", fontfamily="IPAMincho")
   r2 = 2//2
   (r1, a, x2) = (3/2, 5√3/2, √6)
   r0 = √3a - 2r1
   @printf("甲円の直径 = %g\n", 2r1)
   @printf("r1 = %g;  a = %g;  x2 = %g;  r0 = %g\n", r1, a, x2, r0)
   plot([a, 0, -a, a], [0, √3a, 0, 0], color=:black, lw=0.5)
   circle(0, r1, r1)
   circle(0, 3r1, r1)
   circle2(x2, r2, r2, :blue)
   circle(0, 2r1 - r0, r0, :green, beginangle=30, endangle=150)
   (x0, y0) = (r0*cosd(30), (2r1 - r0) + r0*sind(30))
   segment(0, 2r1 - r0, x0, y0, :orange)
   if more == true
       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(x0, y0, " A", :green, :left, :vcenter)
       point(-x0, y0, "C ", :green, :right, :vcenter)
       point(a, 0, " a", :black, :left, :vcenter)
       point(0, √3a, " H:√3a", :black, :left, :vcenter)
       point(0, 2r1 - r0, " B:2r1-r0", :orange, :left, :vcenter)
       point(0, r1, "甲円:r1,(0,r1)", :red, :center, delta=-delta)
       point(0, 3r1, "甲円:r1,(0,3r1)", :red, :center, delta=-delta)
       point(x2, r2, "乙円:x2,(0,r2)", :blue, :center, delta=-delta)
       point(0.6x2, 2r1, "弧背", :green, mark=false)
   end
end;

 


コメント    この記事についてブログを書く
  • Twitterでシェアする
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« 算額(その818) | トップ | 算額(その820) »
最新の画像もっと見る

コメントを投稿

Julia」カテゴリの最新記事