裏 RjpWiki

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

算額(その2045)

2024年08月25日 | Julia

算額(その2045)

百八 群馬県邑楽郡板倉町板倉 雷電神社 慶応3年(1867)
群馬県和算研究会:群馬の算額,上武印刷株式会社,高崎市,1987年3月31日.

楕円の中に等円を 3 個容れる。等円の直径が 1 寸のとき,楕円の短径はいかほどか。

楕円の長半径,短半径,中心座標を a, b, (0, 0)
等円の半径,中心座標を r, (0, 0), (2r, 0)
とおき,以下の連立方程式を解く。
左右の等円は楕円の曲率円なので,r = b^2/a である。また,長半径は等円の半径の 3 倍である。

include("julia-source.txt");

using SymPy
@syms a::positive, b::positive, r::positive
eq1 = b^2/a - r
eq2 = 3r - a
res = solve([eq1, eq2], (a, b))[1]

   (3*r, sqrt(3)*r)

楕円の短径は等円の直径の √3 倍である。
等円の直径が 1 寸のとき,楕円の短径は 1.7320508075688772 寸である。

ちなみに,楕円の長径は等円の直径の 3 倍である。
等円の直径が 1 寸のとき,楕円の長径は 1.7320508075688772 寸である。

function draw(r, more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   (a, b) = (3*r, sqrt(3)*r)
   @printf("等円の直径が %g のとき,楕円の短径は %.8g である。\n", 2r, 2b)
   plot()
   ellipse(0, 0, a, b, color=:red)
   circle2(2r, 0, r, :blue)
   circle(0, 0, r,:blue)
   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(0, b, " b", :red, :left, :bottom, delta=delta/2)
       point(2r, 0, "等円:r,(2r,0)", :blue, :center, delta=-delta/2)
       point(0, 0, "等円:r,(0,0)", :blue, :center, delta=-delta/2)
       point(a, 0, " a", :red, :left, :bottom, delta=delta/2)
   end
end;

draw(1/2, true)


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

コメントを投稿

Julia」カテゴリの最新記事