裏 RjpWiki

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

算額(その1068)

2024年06月15日 | Julia

算額(その1068)

九十六 大船渡市立根 気仙安養寺稲荷堂 文政5年(1822)
山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市.
http://www.wasan.jp/yamamura/yamamura.html

全円の中に,交差する 2 個の甲円,6 個の等円を容れる。等円の直径が 1 寸のとき,全円の直径はいかほどか。

全円の半径と中心座標を R, (0, 0)
甲円の半径と中心座標を r1, (0, R - r1)
等円の半径と中心座標を r2, (r2, 0), (x2, r2)
とおき,以下の連立方程式を解く。

include("julia-source.txt")

using SymPy

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

   (r2*(sqrt(5) + 3), r2*(1 + sqrt(5)), 2*r2*sqrt(2 + sqrt(5)))

全円の半径 R は,等円の半径 r2 の √5 + 3 倍である。
等円の直径が 1 のとき,全円の直径は 5.23606797749979 である。

その他のパラメータは以下のとおりである。
   r2 = 0.5;  R = 2.61803;  r1 = 1.61803;  x2 = 2.05817

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r2 = 1/2
   (R, r1, x2)= r2 .* (√5 + 3, √5 + 1, 2sqrt(√5 + 2))
   @printf("等円の直径が %g のとき,全円の直径は %g である。\n", 2r2, 2R)
   @printf("その他のパラメータは以下のとおりである。\nr2 = %g;  R = %g;  r1 = %g;  x2 = %g\n", r2, R, r1, x2)
   plot()
   circle(0, 0, R)
   circle22(0, R - r1, r1, :green)
   circle4(x2, r2, r2, :blue)
   circle2(r2, 0, r2, :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, R, " R", :red, :left, :bottom, delta=delta/2)
       point(R, 0, " R", :red, :left, :bottom, delta=delta/2)
       point(0, R - r1, "甲円:r1,(0,R-r1)", :green, :center, delta=-delta/2)
       point(r2, 0, "等円:r2\n(r2,0)", :blue, :center, delta=-delta/2)
       point(x2, r2, "等円:r2\n(x2,r2)", :blue, :center, delta=-delta/2)
   end
end;

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

算額(その1067)

2024年06月15日 | Julia

算額(その1067)

九十六 大船渡市立根 気仙安養寺稲荷堂 文政5年(1822)
山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市.
http://www.wasan.jp/yamamura/yamamura.html

等脚台形の中に,直径 1 寸の等円 6 個を容れる。大頭(下底),小頭(上底)はいかほどか。

大頭,小頭を 2a, 2b,高さを h とする。
等円の半径と中心座標を r, (r, h - r), (0, 3r), (0, r), (2r, r)
とおき,以下の連立方程式を解く。

include("julia-source.txt")

using SymPy

@syms a::positive, b::positive, h::positive, r::positive;
eq1 = dist2(a, 0, b, h, 2r, r, r)
eq2 = r*h - (a - b)*(h - 2r)
eq3 = r^2 + (h - r - 3r)^2 - 4r^2
res = solve([eq1, eq2, eq3], (a, b, h))[2]  # 2 of 3

   (r*(-sqrt(3) + 2*sqrt(2 - sqrt(3)) + 4), r*(-1 + sqrt(3)) + 2*r*sqrt(2 - sqrt(3)), r*(sqrt(3) + 4))

大頭 2a, 小頭 2b, 高さ h は等円の直径の (2sqrt(2 - √3) - √3 + 4) 倍, (√3 - 1 + 2sqrt(2 - √3)) 倍, (√3 + 4)/2 倍である。
等円の直径 = 1 のとき,大頭 = 3.303225372841206,小頭 = 1.7673269879789604,高さ = 2.8660254037844384 寸である。

(2sqrt(2 - √3) - √3 + 4), (√3 - 1 + 2sqrt(2 - √3), (√3 + 4)/2)

   (3.303225372841206, (1.7673269879789604, 2.8660254037844384))

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r = 1/2
   (a, b, h) = r .* (2sqrt(2 - √3) - √3 + 4, √3 - 1 + 2sqrt(2 - √3), (√3 + 4))
   @printf("等円の直径 = %g のとき,大頭 = %g,小頭 = %g,高さ = %g\n", 2r, 2a, 2b, h)
   plot([a, b, -b, -a, a], [0, h, h, 0, 0], color=:blue, lw=0.5)
   circle2(r, h -r, r, :red)
   circle(0, 3r, r, :red)
   circle(0, r, r, :red)
   circle2(2r, r, r, :red)
   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(b, h, "(b,h)", :blue, :left, :bottom, delta=delta/2)
       point(a, 0, "a", :blue, :left, :bottom, delta=delta/2)
       point(r, h - r, "(r,h-r)", :red, :center, delta=-delta/2)
       point(0, 3r, " 3r", :red, :left, :vcenter)
       point(0, r, " r", :red, :left, :vcenter)
       point(2r, r, "(2r,r)", :red, :center, delta=-delta/2)
   end
end;

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

算額(その1066)

2024年06月15日 | Julia

算額(その1066)

九十六 大船渡市立根 気仙安養寺稲荷堂 文政5年(1822)
山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市.
http://www.wasan.jp/yamamura/yamamura.html

大円内に正三角形 4 個,中円 1 個と小円 4 個を入れる。小円の直径がわかっているとき中円の直径を求めるすべを求めよ。

算額(その841)の中央の正方形内に円を内接させただけのものである。条件式は同じなので,何を未知数にして解くかにすぎない。

大円の半径と中心座標を R, (0, 0)
正三角形の一辺の長さを 2a
とおき,以下の方程式を解く。

include("julia-source.txt")

using SymPy

@syms R::positive, a::positive, r::positive;
R = (1 + sqrt(Sym(3)))a
eq1 = dist(R, 0, a, a, (R - r)/sqrt(Sym(2)), (R - r)/sqrt(Sym(2))) - r^2
res = solve(eq1, a)[2];

@syms d
res = res/r |> simplify |> (x -> apart(x, d)) |> factor |> (x -> x*r);
res |> println

   -r*(-10 - 3*sqrt(6) + 3*sqrt(2) + 4*sqrt(3))/4

小円の直径が 1 のとき,中円の直径は 1.54440632773869 である。

res(r => 1).evalf() |> println

   1.54440632773869

小円の直径が 1 のとき,大円の直径は 4.219396554912972 である。

R = (1 + √3) * 1.54440632773869
R |> println

   4.219396554912972

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r = 1/2
   a = r*(10 + 3√6 - 3√2 - 4√3)/4
   R = (1 + √3)a
   @printf("小円の直径 = %g;  大円の直径 = %g;  中円の直径 = %g\n", 2r, 2R, 2a)
   plot([a, a, -a, -a, a], [ -a, a, a, -a, -a], color=:blue, lw=0.5)
   circle(0, 0, R, :green)
   # R2 = (4√6 - 1)/4
   # circle(0, 0, R2, :black)
   circle4((R - r)/√2, (R - r)/√2, r)
   circle(0, 0, a, :orange)
   for i in 0:3
       deg = 90i
       plot!([√2a*cosd(deg + 45), R*cosd(deg), √2a*cosd(deg - 45)],
             [√2a*sind(deg + 45), R*sind(deg), √2a*sind(deg - 45)], color=:magenta, lw=0.5)
   end
   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(a, a, "(a,a) ", :blue, :right, delta=-delta/2)
       point(0, (1 + √3)a, " R=(1+√3)a", :green, :center, :bottom, delta=delta/2)
       point((R - r)/√2, (R - r)/√2, "((R-r)/√2,\n(R-r)/√2)", :red, :center, :bottom, delta=delta/2)
   end
end;

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

算額(その1065)

2024年06月15日 | Julia

算額(その1065)

九十六 大船渡市立根 気仙安養寺稲荷堂 文政5年(1822)
山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市.

http://www.wasan.jp/yamamura/yamamura.html

正方形の中に,四分円,半円,甲乙丙丁戊円を容れる。甲乙丙丁戊の 7 個の円の直径の和が 1 寸のとき,正方形の一辺の長さはいかほどか。

正方形の一辺の長さを 2a
甲円の半径と中心座標を r1, (2a - r1, r1)
乙円の半径と中心座標を r2, (x2, y2)
丙円の半径と中心座標を r3, (x3, 2a - x3)
丁円の半径と中心座標を r4, (x4, 2a - x4)
戊円の半径と中心座標を r5, (r5, y5)
とおき,以下の連立方程式を解く。

図形は複雑そうに見えるが,それぞれの円を決定する条件は互いに独立なので,一つずつ決定していけばよい。

1. 甲円を確定する

include("julia-source.txt");

using SymPy
@syms d1::positive, d2::positive, d3::positive, d4::positive, d5::positive
@syms a::positive, r1::positive
eq1 = (2a - r1)^2 + (a - r1)^2 - (a + r1)^2
r1 = solve(eq1, r1)[1]
r1 |> println

   2*a*(2 - sqrt(3))

2. 乙円を確定する

@syms r2::positive, x2::positive, y2::positive
eq2 = (2a - x2)^2 + y2^2 - (2a - r2)^2
eq3 = x2^2 + (a - y2)^2 - (a - r2)^2
eq4 = (a - x2)^2 + (2a - y2)^2 - (a + r2)^2
(r2, x2, y2) = solve([eq2, eq3, eq4], (r2, x2, y2))[1]
(r2, x2, y2) |> println

   (2*a*(-1 + 3*sqrt(2))/17, 2*a*(6 - sqrt(2))/17, 2*a*(13/17 - 5*sqrt(2)/17))

3. 丙円を確定する

@syms r3::positive, x3::positive
eq5 = x3^2 + (a - x3)^2 - (a - r3)^2
eq6 = 2(2a - x3)^2 - (2a + r3)^2
(r3, x3) = solve([eq5, eq6], (r3, x3))[1]
(r3, x3) |> println

   (-a*(4/3 - 2*sqrt(2)/3) + 2*a/3, a*(4/3 - 2*sqrt(2)/3))

4. 丁円を確定する

@syms r4::positive, x4::positive
eq7 = x4^2 + (a - x4)^2 - (a - r4)^2
eq8 = 2(2a - x4)^2 - (2a - r4)^2
(r4, x4) = solve([eq7, eq8], (r4, x4))[1]
(r4, x4) |> println

   (-2*a + 6*a*(4/7 - sqrt(2)/7), 2*a*(4/7 - sqrt(2)/7))

5. 戊円を確定する

@syms r5::positive, y5::positive
eq9 = (a - r5)^2 + (2a - y5)^2 - (a + r5)^2
eq10 = (2a - r5)^2 + y5^2 - (2a + r5)^2
(r5, y5) = solve([eq9, eq10], (r5, y5))[1]
(r5, y5) |> println

   (-a + 2*a*(2 - sqrt(2)), 2*a*(2 - sqrt(2)))

6. 正方形の一辺の長さを求める

全ての円の直径の和が 1 寸という条件は以下のようになる。

eq = 2(r1 + 2r2 + r3 + r4 + 2r5) - 1 |> simplify;
eq |> println

   -2488*sqrt(2)*a/357 - 4*sqrt(3)*a + 7516*a/357 - 1

この方程式を解いて a を求め,2 倍したものが正方形の一辺の長さである。

a = solve(eq, a)[1]
a |> println
2a.evalf() |> println

   -357/(-7516 + 1428*sqrt(3) + 2488*sqrt(2))
   0.468483001717576

正方形の一辺の長さは 0.468483001717576 寸である。

7. 図を描く

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   a = -357/(-7516 + 1428*sqrt(3) + 2488*sqrt(2))
   r1 = 2a*(2 - √3)
   plot([0, 2a, 2a, 0, 0], [0, 0, 2a, 2a, 0], color=:black, lw=0.5)
   circle(2a, 0, 2a, beginangle=90, endangle=180)
   circle(0, a, a, :blue, beginangle=-90, endangle=90)
   circle(a, 2a, a, :blue, beginangle=180, endangle=360)
   circle(2a - r1, r1, r1, :green)
   (r2, x2, y2) = (2*a*(-1 + 3*sqrt(2))/17, 2*a*(6 - sqrt(2))/17, 2*a*(13/17 - 5*sqrt(2)/17))
   circle(x2, y2, r2, :magenta)
   circle(2a - y2, 2a - x2, r2, :magenta)
   (r3, x3) = (-a*(4/3 - 2*sqrt(2)/3) + 2*a/3, a*(4/3 - 2*sqrt(2)/3))
   circle(x3, 2a - x3, r3, :orange)
   (r4, x4) = (-2*a + 6*a*(4/7 - sqrt(2)/7), 2*a*(4/7 - sqrt(2)/7))
   circle(x4, 2a - x4, r4, :tomato)
   (r5, y5) = (-a + 2*a*(2 - sqrt(2)), 2*a*(2 - sqrt(2)))
   circle(r5, y5, r5, :purple)
   circle(2a - y5, 2a - r5, r5, :purple)
   @printf("正方形の一辺の長さは %g 寸である。\n", 2a)
   @printf("その他のパラメータは以下のとおりである。\nr1 = %g;  r2 = %g;  x2 = %g;  y2 = %g;  r3 = %g;  x3 = %g;  r4 = %g;  x4 = %g;  r5 = %g;  y5 = %g\n", r1, r2, x2, y2, r3, x3, r4, x4, r5, y5)
   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, 2a, "2a", :black, :left, :bottom, delta=delta/2)
       point(2a - r1, r1, "甲円:r1,(2a-r1,r1)", :green, :center, delta=-delta/2)
       point(x2, y2, "乙円:r2,(x2,y2)", :magenta, :center, delta=-delta/2)
       point(x3, 2a - x3, "丙円:r3\n(x3,2a-x3)", :orange, :center, delta=-delta/2)
       point(x4, 2a - x4, "丁円:r4\n(x4,2a-x4)", :tomato, :center, delta=-delta/2)
       point(r5, y5, "戊円:r5\n(r5,y5)", :purple, :center, delta=-delta/2)
   end
end;

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

算額(その1064)

2024年06月15日 | Julia

算額(その1064)

九十六 大船渡市立根 気仙安養寺稲荷堂 文政5年(1822)
山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市.

http://www.wasan.jp/yamamura/yamamura.html

大円の中に,中円 1 個,小円 5 個を容れる。小円の直径が 1 寸のとき,大円の直径はいかほどか。なお,中円の直径は大円の半径に等しい。

大円の半径と中心座標を R, (0, 0); R = 2r1
中円の半径と中心座標を r1, (0, r1 - R)
小円の半径と中心座標を r2, (0, R - r2), (x21, y21), (x22, y22)
とおき,以下の連立方程式を解く。

include("julia-source.txt");

using SymPy
@syms R::positive, r1::positive, r2::positive,
     x21::positive, y21::positive,
     x22::positive, y22::negative
R = 2r1
eq1 = x21^2 + y21^2 - (R - r2)^2 |> expand
eq2 = x22^2 + y22^2 - (R - r2)^2 |> expand
eq3 = x22^2 + (y22 - r1 + R)^2 - (r1 + r2)^2 |> expand
eq4 = x21^2 + (R - r2 - y21)^2 - 4r2^2 |> expand
eq5 = (x22 - x21)^2 + (y21 - y22)^2 - 4r2^2 |> expand;

一度に解くことができないので,まずeq2, eq3, eq4, eq5 から x21, y21, x22, y22 を求める。

res = solve([eq2, eq3, eq4, eq5], (x21, y21, x22, y22))[2];
#= x22 =#  res[3] |> println
#= y22 =#  res[4] |> println

   2*sqrt(2)*sqrt(r2)*sqrt(r1 - r2)
   -2*r1 + 3*r2

式が簡単になる x22, y22 のみを採用し,連立方程式を組み直す(eq2, eq3 は意味を持たなくなるので除外)。

include("julia-source.txt");

using SymPy
@syms R::positive, r1::positive, r2::positive,
     x21::positive, y21::positive,
     x22::positive, y22::negative
R = 2r1
x22 = 2*sqrt(Sym(2))*sqrt(r2)*sqrt(r1 - r2)
y22 = -2*r1 + 3*r2
eq1 = x21^2 + y21^2 - (R - r2)^2 |> expand
eq4 = x21^2 + (R - r2 - y21)^2 - 4r2^2 |> expand
eq5 = (x22 - x21)^2 + (y21 - y22)^2 - 4r2^2 |> expand;

println(eq1, ",  # eq1")
println(eq4, ",  # eq4")
println(eq5, ",  # eq5")

   -4*r1^2 + 4*r1*r2 - r2^2 + x21^2 + y21^2,  # eq1
   4*r1^2 - 4*r1*r2 - 4*r1*y21 - 3*r2^2 + 2*r2*y21 + x21^2 + y21^2,  # eq4
   4*r1^2 - 4*r1*r2 + 4*r1*y21 - 4*sqrt(2)*sqrt(r2)*x21*sqrt(r1 - r2) - 3*r2^2 - 6*r2*y21 + x21^2 + y21^2,  # eq5

eq1, eq4, eq5 から,r1, x21, x22 を求める。

res2 = solve([eq1, eq4, eq5], (r1, x21, y21))[1]

   (r2*(CRootOf(x^3 - 2*x^2 + 2*x - 2, 0) + 2 + sqrt(CRootOf(x^3 - 2*x^2 + 2*x - 2, 0)^2 + 8))/4, r2*sqrt(-2*CRootOf(x^3 - 2*x^2 + 2*x - 2, 0)^2 + 8 + 2*sqrt(CRootOf(x^3 - 2*x^2 + 2*x - 2, 0)^2 + 8)*CRootOf(x^3 - 2*x^2 + 2*x - 2, 0))/2, r2*CRootOf(x^3 - 2*x^2 + 2*x - 2, 0))

(CRootOf(x^3 - 2*x^2 + 2*x - 2, 0) は x^3 - 2*x^2 + 2*x - 2 = 0 の実数解を得る関数である。具体的には 1.54368901269208 という数値である。

@syms x
term = sympy.CRootOf(x^3 - 2*x^2 + 2*x - 2, 0).evalf() |> println

   1.54368901269208

eq = x^3 - 2x^2 + 2x - 2
solve(eq)[3].evalf() |> println

   1.54368901269208

r2 が与えられたとき,以上をまとめて,r1, R, x21, y21, x22, y22 を求める手順を示す。

r2 = 1/2
term = 1.54368901269208
r1 = r2*(term + 2 + sqrt(term^2 + 8))/4
R = 2r1
x21 = r2*sqrt(-2*term^2 + 8 + 2*sqrt(term^2 + 8)*term)/2
y21 = r2*term
x22 = 2sqrt(2r2*(r1 - r2))
y22 = 3r2 - 2r1
(R, r1, x21, y21, x22, y22)

   (1.69148788395312, 0.84574394197656, 0.9076890632978463, 0.77184450634604, 1.175999901320676, -0.19148788395312)

中円の半径は,小円の半径の (term + 2 + sqrt(term^2 + 8))/4 = 1.69148788395312 倍,
大円の半径は,中円の半径の 2 倍である。
したがって,大円の半径は 小円の半径の 3.38297576790624 倍である。
小円の直径が 1 寸のとき,大円の直径は 3.38297576790624 寸である。

(term + 2 + sqrt(term^2 + 8))/4

   1.69148788395312

「術」も相当複雑なことをやっている。
結局数値解を求めることになってしまったので,最初から数値解を求めればよかった。

using NLsolve

function nls(func, params...; ini = [0.0])
   if typeof(ini) <: Number
       r = nlsolve((vout, vin) -> vout[1] = func(vin[1], params..., [ini]), ftol=big"1e-40")
       v = r.zero[1]
   else
       r = nlsolve((vout, vin)->vout .= func(vin, params...), ini, ftol=big"1e-40")
       v = r.zero
   end
   return Float64.(v), r.f_converged
end;

function H(u)
   (r1, x21, y21, x22, y22) = u
   return [
       -4*r1^2 + 4*r1*r2 - r2^2 + x21^2 + y21^2,  # eq1
       -4*r1^2 + 4*r1*r2 - r2^2 + x22^2 + y22^2,  # eq2
       -2*r1*r2 + 2*r1*y22 - r2^2 + x22^2 + y22^2,  # eq3
       4*r1^2 - 4*r1*r2 - 4*r1*y21 - 3*r2^2 + 2*r2*y21 + x21^2 + y21^2,  # eq4
       -4*r2^2 + x21^2 - 2*x21*x22 + x22^2 + y21^2 - 2*y21*y22 + y22^2,  # eq5
   ]
end;

r2 = 1/2
iniv = BigFloat[10, 10, 15, 13, 2] ./ 10
res = nls(H, ini=iniv)

   ([0.8457439419765593, 0.907689063297846, 0.7718445063460382, 1.175999901320675, -0.19148788395311875], true)

小円の直径が 1 のとき,大円の直径は 3.38298 である。

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

   r2 = 0.5;  r1 = 0.845744;  R = 1.69149;  x21 = 0.907689;  y21 = 0.771845;  x22 = 1.176;  y22 = -0.191488

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r2 = 1/2
   term = 1.54368901269208
   r1 = r2*(term + 2 + sqrt(term^2 + 8))/4
   R = 2r1
   x21 = r2*sqrt(-2*term^2 + 8 + 2*sqrt(term^2 + 8)*term)/2
   y21 = r2*term
   x22 = 2sqrt(2r2*(r1 - r2))
   y22 = 3r2 - 2r1
   @printf("小円の直径が %g のとき,大円の直径は %g である。\n", 2r2, 2R)
   @printf("その他のパラメータは以下のとおりである。\nr2 = %g;  r1 = %g;  R = %g;  x21 = %g;  y21 = %g;  x22 = %g;  y22 = %g\n", r2, r1, R, x21, y21, x22, y22)
   plot()
   circle(0, 0, R)
   circle(0, R - r2, r2, :blue)
   circle2(x21, y21, r2, :blue)
   circle2(x22, y22, r2, :blue)
   circle(0, r1 - R, r1, :green)
   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, R, " R", :green, :left, :bottom, delta=delta/2)
       point(0, r1 - R, "大円:r2,(0,r1-R)", :green, :center, delta=-delta/2)
       point(0, R - r2, "小円:r2,(0,R-r2)", :blue, :center, delta=-delta/2)
       point(x21, y21, "小円:r2,(x21,y21)", :blue, :center, delta=-delta/2)
       point(x22, y22, "小円:r2,(x22,y22)", :blue, :center, delta=-delta/2)
   end
end;

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

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

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