裏 RjpWiki

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

算額(その535)

2023年12月03日 | Julia

算額(その535)

和算図形問題あれこれ - 令和3年11月の問題?
https://gunmawasan.web.fc2.com/kongetu-no-mondai.html

直線上で等円2個を交差させ,その間に甲円 7 個と乙円 1 個を入れる。甲円の直径から乙円の直径を求める式を導け。

中央の甲円の中心を原点とする。
等円の半径と中心座標を r0, (x0, 0), (-x0, 0)
甲円の半径を r1
上 2 個の甲円の中心座標を (x00, r0 - r1), (-x00, r0 - r1)
右端の甲円の中心座標を (x0 + r0 - r1, 0)
乙円の半径と中心座標を r2, (0, r2 - r0)
とおき,以下の連立方程式を解く。

x00 ≠ x0 であることに注意!!

include("julia-source.txt");

using SymPy

@syms r0, x0, x00, r1, r2

eq1 = (x0 + x00)^2 + (r0 - r1)^2 - (r0 + r1)^2
eq2 = x0^2 + (r2 - r0)^2 - (r0 + r2)^2
eq3 = (x0 + r0 - r1 - x00)^2 + (r0 - r1)^2 - (2r1)^2
eq4 = x0 - r0 + r1
res = solve([eq1, eq2, eq3, eq4], (x0, x00, r0, r2))

   4-element Vector{NTuple{4, Sym}}:
    (0, -2*r1, r1, 0)
    (0, 2*r1, r1, 0)
    (4*r1*(2 - 3*sqrt(6))/25, -8*sqrt(6)*r1/25 + 22*r1/25, 3*r1*(11 - 4*sqrt(6))/25, r1*(16*sqrt(6)/75 + 56/75))
    (4*r1*(2 + 3*sqrt(6))/25, 8*sqrt(6)*r1/25 + 22*r1/25, 3*r1*(4*sqrt(6) + 11)/25, r1*(56/75 - 16*sqrt(6)/75))

4 組の解が得られるが,4 番目の解が適解である。

乙円の直径は甲円の直径の (56 - 16√6)/75 ≒ 0.22410885487292206 倍である。

(56 - 16√6)/75

   0.22410885487292206

その他のパラメータは以下の通り。

   r1 = 1;  x0 = 1.49576;  x00 = 1.66384;  r0 = 2.49576;  r2 = 0.224109

function draw(more=false)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r1 = 1
   (x0, x00, r0, r2) = (4*r1*(2 + 3*sqrt(6))/25, 8*sqrt(6)*r1/25 + 22*r1/25, 3*r1*(4*sqrt(6) + 11)/25, r1*(56/75 - 16*sqrt(6)/75))
   @printf("r1 = %g;  x0 = %g;  x00 = %g;  r0 = %g;  r2 = %g\n", r1, x0, x00, r0, r2)
   plot()
   circle(x0, 0, r0, :blue)
   circle(-x0, 0, r0, :blue)
   circle4(x00, r0 - r1, r1)
   circle(0, 0, r1)
   circle(x0 + r0 - r1, 0, r1)
   circle(-x0 - r0 + r1, 0, r1)
   circle(0, r2 - r0, r2, :green)
    if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       hline!([0, -r0], color=:black, lw=0.5)
       vline!([0], color=:black, lw=0.5)
       point(x0, 0, "x0", :blue, :center, delta=-delta)
       point(-x0, 0, "-x0", :blue, :center, delta=-delta)
       point(x00, r0 - r1, "甲円:r1\n(x00,r0-r1)", :red, :center, delta=-delta)
       point(-x00, r0 - r1, "(-x00,r0-r1)", :red, :center, delta=-delta)
       point(x0 + r0 - r1, 0, "(x0+r0-r1,0)", :red, :center, delta=-delta)
       point(0, r2 - r0, " 乙円:r2,(0,r2-r0)", :black, :left, :bottom, delta=2delta)
    end
end;

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

算額(その534)

2023年12月03日 | Julia

算額(その534)

和算図形問題あれこれ - 令和3年11月の問題3
https://gunmawasan.web.fc2.com/kongetu-no-mondai.html

外円の中に弦と甲円,乙円,丙円,丁円を入れる。甲円,丙円,丁円の直径がそれぞれ 135 寸,60 寸,54 寸のとき,外円の直径はいかほどか。

弦と y 軸の交点座標を (0, a) とする。
外円の半径と中心座標を r0, (0, 0)
甲円の半径と中心座標を r1, (x1, a + r1)
乙円の半径と中心座標を r2, (x2, y2)
丙円の半径と中心座標を r3, (x3, a + r3)
丁円の半径と中心座標を r4, (r4, a + r4)
とおき,以下の連立方程式を解く。

include("julia-source.txt");

using SymPy

@syms r1, r3, r4, r0, a::negative, x1, r2, x2::negative, y2, x3::negative, x4::negative
(r1, r3, r4) = (135, 60, 54) .// 2
eq1 = x1^2 + (a + r1)^2 - (r0 - r1)^2
eq2 = (x1 - x2)^2 + (a + r1 - y2)^2 - (r1 +r2)^2
eq3 = (x1 - x4)^2 + (r1 - r4)^2 - (r1 + r4)^2
eq4 = x2^2 + y2^2 - (r0 - r2)^2
eq5 = (x2 - x3)^2 + (y2 - a - r3)^2 - (r2 + r3)^2
eq6 = (x2 - x4)^2 + (y2 - a - r4)^2 - (r2 + r4)^2
eq7 = x3^2 + (a + r3)^2 - (r0 - r3)^2
eq8 = (x4 - x3)^2 + (r3 - r4)^2 - (r3 + r4)^2
res = solve([eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8], (r0, a, x1, r2, x2, y2, x3, x4))

   1-element Vector{NTuple{8, Sym}}:
    (125, -35, 15*sqrt(10), 675/16, -75*sqrt(10)/4, 925/16, -30*sqrt(10), -12*sqrt(10))

外円の直径は 250 寸である。

その他のパラメータは以下の通り。

   r0 = 125;  a = -35;  r1 = 67.5; x1 = 47.4342
   r2 = 42.1875;  x2 = -59.2927;  y2 = 57.8125
   r3 = 30;  x3 = -94.8683;  r4 = 27;  x4 = -37.9473
   外円の直径 = 250

function draw(more=false)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   (r1, r3, r4) = (135, 60, 54) .// 2
   (r0, a, x1, r2, x2, y2, x3, x4) = res[1]
   @printf("r0 = %g;  a = %g;  r1 = %g; x1 = %g\nr2 = %g;  x2 = %g;  y2 = %g\nr3 = %g;  x3 = %g;  r4 = %g;  x4 = %g\n外円の直径 = %g\n",
       r0, a, r1, x1, r2, x2, y2, r3, x3, r4, x4, 2r0)
   plot()
   circle(0, 0, r0)
   circle(x1, a + r1, r1, :blue)
   circle(x2, y2, r2, :green)
   circle(x3, a + r3, r3, :magenta)
   circle(x4, a + r4, r4, :orange)
   segment(-sqrt(r0^2 - a^2), a, sqrt(r0^2 - a^2), a, :brown)
    if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       hline!([0], color=:black, lw=0.5)
       vline!([0], color=:black, lw=0.5)
       point(x1, a + r1, "甲円:r1,(x1,a+r1)", :blue, :center, :top, delta=-delta/2)
       point(x2, y2, "乙円:r2,(x2,y2)", :green, :center, :top, delta=-delta/2)
       point(x3, a + r3, "丙円:r3\n(x3,a+r3)", :magenta, :center, :top, delta=-delta/2)
       point(x4, a + r4, "丁円:r4\n(x4,a+r4)", :orange, :center, :top, delta=-delta/2)
       point(r0, 0, "r0 ", :brown, :right, :top, delta=-delta/2)
       point(0, a, " a", :brown, :left, :top, delta=-delta/2)
    end
end;

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

算額(その533)

2023年12月03日 | Julia

算額(その533)

和算図形問題あれこれ - 令和3年11月の問題1
https://gunmawasan.web.fc2.com/kongetu-no-mondai.html

外円内に円弧 2 個,甲円 3 個,乙円 2 個を入れる。乙円の直径が 1 寸のとき,外円の直径はいかほどか。

外円の半径と中心座標を r0, (0, 0);  r0 = 3r1
甲円の半径と中心座標を r1, (0, 0), (0, 2r1)
乙円の半径と中心座標を r2, (r1 + r2, 0)
円弧の半径と中心座標を r3, (0, r1 - r3)
とおき,以下の連立方程式を解く。

include("julia-source.txt");

using SymPy

@syms r0::positive, r1::positive, r2::positive, r3::positive;
eq1 =(r1 + r2)^2 + (r3 - r1)^2 - (r3 - r2)^2
eq2 = (3r1)^2 + (r3 - r1)^2 - r3^2
res = solve([eq1, eq2], (r1, r3))

   1-element Vector{Tuple{Sym, Sym}}:
    (3*r2/2, 15*r2/2)

甲円の半径は乙円の半径の 3/2 倍である。
外円の半径は甲円の半径の 3 倍である。
したがって,乙円の直径が 1 寸ならば,甲円の直径は 9/2 寸である。

その他のパラメータは以下の通り。

   外円の直径 = 4.5;  r0 = 2.25;  r1 = 0.75;  r2 = 0.5;  r3 = 3.75

function draw(more=false)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r2 = 1//2
   (r1, r3) = (3*r2/2, 15*r2/2)
   r0 = 3r1
   @printf("外円の直径 = %g;  r0 = %g;  r1 = %g;  r2 = %g;  r3 = %g\n", 2r0, r0, r1, r2, r3)
   plot()
   circle(0, 0, r0)
   circle(0, 0, r1, :blue)
   circle(0, 2r1, r1, :blue)
   circle(0, -2r1, r1, :blue)
   circle(r1 + r2, 0, r2, :magenta)
   circle(-r1 - r2, 0, r2, :magenta)
   θ = atand(r3 - r1, r0)
   circle(0, r1 - r3, r3, :green, beginangle=θ, endangle=180-θ)
   circle(0, r3 - r1, r3, :green, beginangle=180+θ, endangle=360-θ)
    if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       hline!([0], color=:black, lw=0.5)
       vline!([0], color=:black, lw=0.5)
       point(0, 2r1, " 2r1", :blue, :left, :vcenter)
       point(0, r1, " r1", :blue, :left, :bottom, delta=delta)
       point(r1 + r2, 0, "r1+r2", :magenta, :center, :bottom, delta=delta)
       point(r1, 0, "r1 ", :red, :right, :bottom, delta=delta)
       point(r0, 0, " r0", :red, :left, :bottom, delta=delta)
       point(0, r1 - r3, " r1-r3", :green, :left, :vcenter)
    end
end;

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

算額(その532)

2023年12月03日 | Julia

算額(その532)

和算図形問題あれこれ - 令和4年1月の問題
https://gunmawasan.web.fc2.com/kongetu-no-mondai.html

大円内に長さの等しい2直線で仕切り,その中に甲円 2 個と,乙円 1 個を入れる。乙円の直径が 1 寸のとき,甲円の直径はいかほどか。

2 本の勅撰の交点の y 座標を y とする。
外円の半径と中心座標を r0, (0, 0)
甲円の半径と中心座標を r1, (r1, y - r1)
乙円の半径と中心座標を r2, (0, r0 - r2)
とおき,以下の連立方程式を解く。

include("julia-source.txt");

using SymPy

@syms r0::positive, r1::positive, r2::positive, y::positive;
eq1 = (r0^2 - y^2) - (r0 - r2)^2
eq2 = r1^2 + (y - r1)^2 - (r0 - r1)^2
eq3 = (r0^2 - y^2) - (r0^2 -(r0 - 2r2)^2)
res = solve([eq1, eq2, eq3], (r0, r1, y))

   1-element Vector{Tuple{Sym, Sym, Sym}}:
    (5*r2, 4*r2*(-1/2 + sqrt(5)/2), 3*r2)

甲円の半径は乙円の半径の 2√5 - 2 倍である。
乙円の直径が 1 寸ならば,甲円の半径は 2.4721359549995796 寸である。

その他のパラメータは以下の通り。

   甲円の直径 = 2.47214;  r0 = 2.5;  r1 = 1.23607;  r2 = 0.5;  y = 1.5

function draw(more=false)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r2 = 1//2
   (r0, r1, y) = (5*r2, 2*r2*(-1 + sqrt(5)), 3*r2)
   @printf("甲円の直径 = %g;  r0 = %g;  r1 = %g;  r2 = %g;  y = %g\n", 2r1, r0, r1, r2, y)
   plot()
   circle(0, 0, r0)
   circle(r1, y - r1, r1, :blue)
   circle(-r1, y - r1, r1, :blue)
   circle(0, r0 - r2, r2, :magenta)
   segment(-sqrt(r0^2 - y^2), y, sqrt(r0^2 - y^2), y, :green)
   segment(0, y, 0, -r0, :green)
    if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       #hline!([0], color=:black, lw=0.5)
       #vline!([0], color=:black, lw=0.5)
       point(0, 0, " 外円:r0,(0,0)", :red, :left, :top, delta=-delta/2)
       point(r1, y - r1, "甲円:r1,(r1,y-r1)", :blue, :center, :bottom, delta=delta/2)
       point(0, y + r2, " 乙円:r2,(0,y+r2)", :black, :left, :top, delta=-delta/2)
       point(0, y, " y")
    end
end;

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

算額(その531)

2023年12月03日 | Julia

算額(その531)

和算図形問題あれこれ - 令和4年2月の問題-No.2
https://gunmawasan.web.fc2.com/kongetu-no-mondai.html

長方形の中に甲円,乙円,丙円を入れる。甲円と乙円の直径がそれぞれ 8寸,2寸のとき,丙円の直径はいかほどか。

図は 甲円と乙円の直径がそれぞれ 10寸,2寸のときのものである。

長方形の左上の頂点を原点とする。長方形の横幅は本問とは関係ないが,長方形の右辺と外円が接するよりは大きい方がよいだろう。
外円の半径と中心座標を r0, (x0, y0) 注:y0 < 0 である
甲円の半径と中心座標を r1, (r1, -r1)
乙円の半径と中心座標を r2, (x0, r2)
丙円の半径と中心座標を r3, (-r3, y0)
とおき,以下の連立方程式を解く。

include("julia-source.txt");

using SymPy

@syms r0::positive, x0::positive, y0::negative,
     r1::positive, r2::positive, r3::positive;
eq1 = x0^2 + y0^2 - r0^2
eq2 = sqrt(r0^2 - (r0 - 2r2)^2) - x0  # 平方式にすると解けなくなる
eq3 = sqrt(r0^2 - (r0 - 2r3)^2) + y0  # 平方式にすると解けなくなる
eq4 = (x0 - r1)^2 + (y0 + r1)^2 - (r0 - r1)^2
res = solve([eq1, eq2, eq3, eq4], (r0, x0, y0, r3))

   6-element Vector{NTuple{4, Sym}}:
    ((-r1^2/4 + r1*r2 - 2*r2^(3/2)*sqrt(-r1 + r2) - 2*r2^2)/(r1 - 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2), r1*(sqrt(r2)*sqrt(-r1 + r2) + r2)/(-r1 + 2*sqrt(r2)*sqrt(-r1 + r2) + 2*r2), -r1/4 - sqrt(r2)*sqrt(-r1 + r2)/2 - r2/2, (r1^2/8 - r1*r2/2 - r1*sqrt(-r1*r2 + 2*r2^(3/2)*sqrt(-r1 + r2) + 2*r2^2)/2 + r2^(3/2)*sqrt(-r1 + r2) + r2^2)/(-r1 + 2*sqrt(r2)*sqrt(-r1 + r2) + 2*r2))
    ((-r1^2/4 + r1*r2 - 2*r2^(3/2)*sqrt(-r1 + r2) - 2*r2^2)/(r1 - 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2), r1*(sqrt(r2)*sqrt(-r1 + r2) + r2)/(-r1 + 2*sqrt(r2)*sqrt(-r1 + r2) + 2*r2), -r1/4 - sqrt(r2)*sqrt(-r1 + r2)/2 - r2/2, (r1^2/8 - r1*r2/2 + r1*sqrt(-r1*r2 + 2*r2^(3/2)*sqrt(-r1 + r2) + 2*r2^2)/2 + r2^(3/2)*sqrt(-r1 + r2) + r2^2)/(-r1 + 2*sqrt(r2)*sqrt(-r1 + r2) + 2*r2))
    ((-r1^2/4 + r1*r2 + 2*r2^(3/2)*sqrt(-r1 + r2) - 2*r2^2)/(r1 + 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2), r1*(sqrt(r2)*sqrt(-r1 + r2) - r2)/(r1 + 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2), -r1/4 + sqrt(r2)*sqrt(-r1 + r2)/2 - r2/2, (-r1^2/8 + r1*r2/2 - r1*sqrt(-r1*r2 - 2*r2^(3/2)*sqrt(-r1 + r2) + 2*r2^2)/2 + r2^(3/2)*sqrt(-r1 + r2) - r2^2)/(r1 + 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2))
    ((-r1^2/4 + r1*r2 + 2*r2^(3/2)*sqrt(-r1 + r2) - 2*r2^2)/(r1 + 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2), r1*(sqrt(r2)*sqrt(-r1 + r2) - r2)/(r1 + 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2), -r1/4 + sqrt(r2)*sqrt(-r1 + r2)/2 - r2/2, (-r1^2/8 + r1*r2/2 + r1*sqrt(-r1*r2 - 2*r2^(3/2)*sqrt(-r1 + r2) + 2*r2^2)/2 + r2^(3/2)*sqrt(-r1 + r2) - r2^2)/(r1 + 2*sqrt(r2)*sqrt(-r1 + r2) - 2*r2))
    (r1^2/(16*r2) + r1/2 + 2*r2, r1/2 + 2*r2, -r1*(r1 + 8*r2)/(16*r2), r1^2/(32*r2) + r1/4 + r2 - sqrt(r1^2 + 8*r1*r2 + 16*r2^2)/4)
    (r1^2/(16*r2) + r1/2 + 2*r2, r1/2 + 2*r2, -r1*(r1 + 8*r2)/(16*r2), r1^2/(32*r2) + r1/4 + r2 + sqrt(r1^2 + 8*r1*r2 + 16*r2^2)/4)

6 組の解が得られるが,5 番目のものが適解である。

丙円の半径は r1^2/(32*r2) + r1/4 + r2 - sqrt(r1^2 + 8*r1*r2 + 16*r2^2)/4 である。
甲円,乙円の直径が 8, 2 のとき 丙円の直径は 1 である。このとき,甲円と外円の中心の x 座標が等しくなる。

(r1, r2) = (8, 2) .// 2
r1^2/(32*r2) + r1/4 + r2 - sqrt(r1^2 + 8*r1*r2 + 16*r2^2)/4

   0.5

   r1 = 4;  r2 = 1;  r0 = 5;  x0 = 4;  y0 = -3;  r3 = 0.5

function draw(r1, r2, more=false)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   (r0, x0, y0, r3) = (r1^2/(16*r2) + r1/2 + 2*r2, r1/2 + 2*r2, -r1*(r1 + 8*r2)/(16*r2), r1^2/(32*r2) + r1/4 + r2 - sqrt(r1^2 + 8*r1*r2 + 16*r2^2)/4)
   @printf("r1 = %g;  r2 = %g;  r0 = %g;  x0 = %g;  y0 = %g;  r3 = %g\n", r1, r2, r0, x0, y0, r3)
   plot()
   circle(x0, y0, r0)
   circle(x0, r2, r2, :blue)
   circle(-r3, y0, r3, :magenta)
   circle(r1, -r1, r1, :orange)
   rect(0, y0 - r0, x0 + r0, 0, :green)
    if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       hline!([0], color=:black, lw=0.5)
       vline!([0], color=:black, lw=0.5)
       point(x0, y0, " 外円:r0,(x0,y0)", :red, :left)
       point(r1, -r1, " 甲円:r1,(r1,-r1)", :orange, :left)
       point(x0, r2, " 乙円:r2,(x0,r2)", :black, :left, :vcenter)
       point(-r3, y0, " 丙円:r3,(-r3,y0)", :magenta, :left, :vcenter)
       point(x0 + r0, y0 - r0, "(x0+y0,y0-r0) ", :green, :right, :bottom, delta=delta/2)
    end
end;

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

算額(その530)

2023年12月03日 | Julia

算額(その530)

和算図形問題あれこれ - 令和4年2月の問題-No.1
https://gunmawasan.web.fc2.com/kongetu-no-mondai.html

外円内に一辺の長さが,それぞれ 15寸,7寸の正方形を入れる。外円の直径はいかほどか。

外円の半径と中心座標を R, (0, 0) とする。
小さい方の正方形の右上の頂点,大きい方の右下の頂点の座標を (x1, y2), (x2, y2),それぞれの一辺の長さを a, b とおき,以下の連理方程式を解く。

include("julia-source.txt");

using SymPy

@syms R::positive, x1::positive, y1::positive, x2::positive, y2::negative,
a::positive, b::positive;

eq1 = 2x1 - a
eq2 = sqrt(R^2 -x1^2) - y1
eq3 = 2x2 - b
eq4 = sqrt(R^2 -x2^2) + y2
eq5 = y1 - y2 - (a + b)
res = solve([eq1, eq2, eq3, eq4, eq5], (R, x1, y1, x2, y2))

   1-element Vector{NTuple{5, Sym}}:
    (sqrt(25*a^2 + 30*a*b + 25*b^2)/8, a/2, sqrt(9*a^2 + 30*a*b + 25*b^2)/8, b/2, -a - b + sqrt(9*a^2 + 30*a*b + 25*b^2)/8)

外円の半径は sqrt(25*a^2 + 30*a*b + 25*b^2)/8 である。
a = 7, b = 15 のとき, 半径は 12.5 寸,直径は 25 寸である。

a = 7
b = 15
sqrt(25*a^2 + 30*a*b + 25*b^2)/8

   12.5

その他のパラメータは以下の通り。

   R = 12.5;  x1 = 3.5;  y1 = 12;  x2 = 7.5;  y2 = -10

function draw(more=false)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   (a, b) = (7, 15)
   (R, x1, y1, x2, y2) = (sqrt(25*a^2 + 30*a*b + 25*b^2)/8, a/2, sqrt(9*a^2 + 30*a*b + 25*b^2)/8, b/2, -a - b + sqrt(9*a^2 + 30*a*b + 25*b^2)/8)
   @printf("R = %g;  x1 = %g;  y1 = %g;  x2 = %g;  y2 = %g\n", R, x1, y1, x2, y2)
   plot()
   circle(0, 0, R)
   rect(-x1, y1 - 7, x1, y1, :blue)
   rect(-x2, y2, x2, y2 + 15, :orange)
    if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3  # size[2] * fontsize * 2
       hline!([0], color=:black, lw=0.5)
       vline!([0], color=:black, lw=0.5)
       point(x1, y1, "(x1,y1) ", :blue, :right, :top, delta=-delta/2)
       point(x2, y2, "(x2,y2) ", :blue, :right, :bottom, delta=delta/2)
       point(R, 0, "R ", :red, :right, :bottom, delta=delta/2)
    end
end;

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

PVアクセスランキング にほんブログ村

PVアクセスランキング にほんブログ村