裏 RjpWiki

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

家紋シリーズ 鱗(3) 六つ鱗 

2021年08月29日 | ブログラミング

家紋シリーズ 鱗(3) 六つ鱗 

include("plotter.jl")

function mutuuroko(; r=1, width=400, height=400)
    plotbegin(w=width, h=height)
    plotpolygon2(0, 0, r, 3, lwd=0, fcol=:black)
    plotpolygon2(0, 0, r, 3, φ = 30, lwd=0, fcol=:black)
    plotpolygon2(0, 0, r/sqrt(3), 6, φ = 60, lwd=0, fcol=:white)
    plotend()
end


mutuuroko()

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

家紋シリーズ 鱗(2) 三つ鱗,丸に三つ鱗

2021年08月29日 | ブログラミング

家紋シリーズ 鱗(2) 三つ鱗,丸に三つ鱗

include("plotter.jl")

function mituuroko(; r=1, width=400, height=400, maru=false)
    u = sqrt(3)/6*r
    !maru && plotbegin(w=width, h=height)
    plotpolygon2(0, u, u, 3, lwd=0, fcol=:black)
    plotpolygon2(r/4, -0.5u, u, 3, lwd=0, fcol=:black)
    plotpolygon2(-r/4, -0.5u, u, 3, lwd=0, fcol=:black)
    !maru && plotend()
end

mituuroko()

function marunimituuroko(; r=1, width=400, height=400)
    plotbegin(w=width, h=height)
    plotcircle(0, 0, r, fcol=:black)
    plotcircle(0, 0, 60/70*r, col=:white, fcol=:white)
    mituuroko(; r=1.43, maru=true)
    plotend()
end

marunimituuroko()

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

家紋シリーズ 鱗(1) 丸に一つ鱗 

2021年08月29日 | ブログラミング

家紋シリーズ 鱗(1) 丸に一つ鱗 

include("plotter.jl")

function marunihitotuuroko(; r=1, width=400, height=400)
    u = r/140
    plotbegin(w=width, h=height)
    plotcircle(0, 0, 70u, fcol=:black)
    plotcircle(0, 0, 57u, fcol=:white)
    plotpolygon2(0, 0, 54u, 3, fcol=:black)
    plotend()
end

marunihitotuuroko()

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

家紋シリーズ 梅(9) 八重向こう梅

2021年08月29日 | ブログラミング

家紋シリーズ 梅(9) 八重向こう梅

include("plotter.jl")

function yaemukouume(; r=1, width=400, height=400)
    u = r/72
    plotbegin(w=width, h=height)
    for i = 54:72:342
        plotcircle(43u*cosd(i), 43u*sind(i), 31u, fcol=:black)
    end
    for i = 18:72:306
        plotcircle(43u*cosd(i), 43u*sind(i), 30u, lwd=3, col=:white, fcol=:white)
    end
    for i = 18:72:306
        plotcircle(43u*cosd(i), 43u*sind(i), 28u, lwd=3, fcol=:black)
    end
    plotcircle(0, 0, 40u, fcol=:black)
    plotcircle(0, 0, 9u, col=:white, fcol=:white)
    plotcircle(0, 0, 7u * r, fcol=:black)
    d = 3
    for i = 6:12:354
        plotpolygon([39u*cosd(i), 9u*cosd(i-d), 9u*cosd(i+d)],
                    [39u*sind(i), 9u*sind(i-d), 9u*sind(i+d)],
                    col=:white, fcol=:white)
        plotcircle(39u*cosd(i), 39u*sind(i), u, col=:white, fcol=:white)
    end
    plotend()
end

yaemukouume()

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

家紋シリーズ 梅(8) 向こう梅

2021年08月29日 | ブログラミング

家紋シリーズ 梅(8) 向こう梅

include("plotter.jl")

function mukouume(; r=1, width=400, height=400)
    u = r/72
    plotbegin(w=width, h=height)
    for i = 18:72:306
        plotcircle(43u*cosd(i), 43u*sind(i), 28u, fcol=:black)
    end
    plotcircle(0, 0, 40u, fcol=:black)
    plotcircle(0, 0, 9u, col=:white, fcol=:white)
    plotcircle(0, 0, 7u * r, fcol=:black)
    d = 3
    for i = 6:12:354
        plotpolygon([40u*cosd(i), 9u*cosd(i-d), 9u*cosd(i+d)],
                    [40u*sind(i), 9u*sind(i-d), 9u*sind(i+d)],
                    col=:white, fcol=:white)
        plotcircle(40u*cosd(i), 40u*sind(i), u, col=:white, fcol=:white)
    end
    plotend()
end

mukouume()

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

家紋シリーズ 梅(7) 八重梅,丸に八重梅

2021年08月29日 | ブログラミング

家紋シリーズ 梅(7) 八重梅,丸に八重梅

include("plotter.jl")

function yaeume(; r=1, width=400, height=400, maru=false)
    u = r/70
    ! maru && plotbegin(w=width, h=height)
    for i = 54:72:342
        plotcircle(46u*cosd(i), 46u*sind(i), 26u, fcol=:black)
    end
    for i = 18:72:306
        plotcircle(46u*cosd(i), 46u*sind(i), 27u, lwd=3,
                   col=:white, fcol=:black)
        R = sqrt(46^2-26^2) * r / 70
        xs = [0, R*cosd(54), R*cosd(18), 0]
        ys = [0, R*sind(54), R*sind(-18), 0]
        xs2 = copy(xs)
        ys2 = copy(ys)
        sine, cosine = sincosd(i+18)
        for j = 1:length(xs)
            xs2[j], ys2[j] = xs[j]cosine + ys[j]sine, xs[j]sine - ys[j]cosine
        end
        plotpolygon(xs2, ys2, fcol=:black)
    end
    for i = 18:72:306
        plotline(0, 0, 25u*cosd(i), 25u*sind(i), col=:white, lwd=4)
        plotline(0, 0, 40u*cosd(i+36), 40u*sind(i+36), col=:white, lwd=4)
    end
    plotcircle(0, 0, 12u, col=:white, fcol=:white)
    plotcircle(0, 0, 10u, fcol=:black)
    ! maru && plotend()
end

yaeume()

function maruniyaeume(; r=1, width=400, height=400)
    u = r/71
    plotbegin(w=width, h=height)
    plotcircle(0, 0, 71u, fcol=:black)
    plotcircle(0, 0, 60u, col=:white, fcol=:white)
    yaeume(r=0.8, maru=true)
    plotend()
end

maruniyaeume()

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

家紋シリーズ 梅(6) 梅の花,丸に梅の花

2021年08月29日 | ブログラミング

家紋シリーズ 梅(6) 梅の花,丸に梅の花

include("plotter.jl")

function umenohana(; r=1, width=400, height=400, maru=false)
    u = r/70
    ! maru && plotbegin(w=width, h=height)
    for i = 18:72:306
        plotcircle(46u*cosd(i), 46u*sind(i), 26u, fcol=:black)
        R = sqrt(46^2-26^2)u
        xs = [0, R*cosd(54), R*cosd(18), 0]
        ys = [0, R*sind(54), R*sind(-18), 0]
        xs2 = copy(xs)
        ys2 = copy(ys)
        sine, cosine = sincosd(i+18)
        for j = 1:length(xs)
            xs2[j], ys2[j] = xs[j]cosine + ys[j]sine, xs[j]sine - ys[j]cosine
        end
        plotpolygon(xs2, ys2, fcol=:black)
    end
    for i = 18:72:306
        plotline(0, 0, 25u*cosd(i), 25u*sind(i), col=:white, lwd=4)
        plotline(0, 0, 50u*cosd(i+36), 50u*sind(i+36), col=:white, lwd=4)
    end
    plotcircle(0, 0, 12u, col=:white, fcol=:white)
    plotcircle(0, 0, 10u, fcol=:black)
    ! maru && plotend()
end

umenohana()

function maruniumenohana(; r=1, width=400, height=400)
    u = r/71
    plotbegin(w=width, h=height)
    plotcircle(0, 0, 71u, fcol=:black)
    plotcircle(0, 0, 60u, col=:white, fcol=:white)
    umenohana(r=0.8, maru=true)
    plotend()
end

maruniumenohana()

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

家紋シリーズ 梅(5) 丸に剣梅鉢

2021年08月29日 | ブログラミング

家紋シリーズ 梅(5) 丸に剣梅鉢

include("plotter.jl")

function marunikenumebati(; r=1, width=400, height=400)
    u = r/70
    plotbegin(w=width, h=height)
    plotcircle(0, 0, r, fcol=:black)
    plotcircle(0, 0, 58/70*r, fcol=:white)
    x = [-20.33,-20.33,26.82,28.24,29.65,31.06,32.47,33.88,35.29,36.71,
         38.12,39.53,40.94,42.35,43.76,45.18,46.59,48.0,56.47,-20.33] .* u
    y = [0.0,2.16,2.16,2.16,2.22,2.27,2.57,2.98,3.38,3.92,4.6,5.38,
         6.36,7.5,8.79,10.28,11.99,13.91,0.0,0.0] .* u
    xs = vcat(x, reverse(x))
    ys = vcat(y, -reverse(y))
    for i = 54:72:400
        xs2 = copy(xs)
        ys2 = copy(ys)
        sine, cosine = sincosd(i)
        for j = 1:length(xs)
            xs2[j], ys2[j] = xs[j]cosine + ys[j]sine, xs[j]sine - ys[j]cosine
        end
        plotpolygon(xs2, ys2, fcol=:black)
    end
    for i = 18:72:306
        plotcircle(39u*cosd(i), 39u*sind(i), 17u, fcol=:black)
    end
    plotcircle(0, 0, 10u, col=:white, fcol=:white)
    plotcircle(0, 0, 8u, fcol=:black)
    plotend()
end

marunikenumebati()

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

家紋シリーズ 梅(4) 丸に星梅鉢

2021年08月29日 | ブログラミング

家紋シリーズ 梅(4) 丸に星梅鉢

include("plotter.jl")

function marunihosiumebati(; r=1, width=400, height=400)
    u = r/70
    plotbegin(w=width, h=height)
    plotcircle(0, 0, r, fcol=:black)
    plotcircle(0, 0, 60u, fcol=:white)
    plotcircle(0, 0, 14u, fcol=:black)
    for i = 18:72:306
        plotcircle(37u*cosd(i), 37u*sind(i), 20.5u, fcol=:black)
    end
    plotend()
end

marunihosiumebati()

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

家紋シリーズ 梅(3) 丸に梅鉢

2021年08月29日 | ブログラミング

家紋シリーズ 梅(3) 丸に梅鉢

include("plotter.jl")

function maruniumebati(; r=1, width=400, height=400)
    u = r/70
    plotbegin(w=width, h=height)
    plotcircle(0, 0, 70u, fcol=:black)
    plotcircle(0, 0, 58u, fcol=:white)
    plotpolygon2(0, 0, 18u, 5, φ=54, fcol=:black)
    plotcircle(0, 0, 10.5u, fcol=:white)
    for i = 0:36:324
        plotline(0, 0, 18u*cosd(i), 18u*sind(i), lwd=3, col=:white)
    end
    plotcircle(0, 0, 8.5u, fcol=:black)
    for i = 18:72:306
        plotcircle(36.2u*cosd(i), 36.2u*sind(i), 19.5u, fcol=:black)
    end
    plotend()
end

maruniumebati()

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

家紋シリーズ 梅(2) 加賀梅鉢

2021年08月29日 | ブログラミング

家紋シリーズ 梅(2) 加賀梅鉢

include("plotter.jl")

function kagaumebati(; r=1, width=400, height=400)
    u = r/25
    plotbegin(w=width, h=height)
    plotpolygon2(0, 0, r, 5, φ=54, fcol=:black)
    plotcircle(0, 0, 16u, fcol=:white)
    for i = 0:36:324
        plotline(0, 0, r*cosd(i), r*sind(i), lwd=8, col=:white)
    end
    plotcircle(0, 0, 11u, fcol=:black)
    for i = 18:72:306
        plotcircle(48u*cosd(i), 48u*sind(i), r, fcol=:black)
    end
    plotend()
end

kagaumebati()

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

家紋シリーズ 梅(1) 梅鉢

2021年08月29日 | ブログラミング

家紋シリーズ 梅(1) 梅鉢

include("plotter.jl")

function umebati(; r=1, width=400, height=400)
    u = r/23
    plotbegin(w=width, h=height)
    plotpolygon2(0, 0, 23u, 5, φ=54, fcol=:black)
    plotcircle(0, 0, 14u, fcol=:white)
    for i = 0:36:324
        plotline(0, 0, 23u*cosd(i), 23u*sind(i), lwd=3, col=:white)
    end
    plotcircle(0, 0, 12u, fcol=:black)
    for i = 18:72:306
        plotcircle(46u*cosd(i), 46u*sind(i), 25u, fcol=:black)
    end
    plotend()
end

umebati()

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

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

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