以下の内容はhttps://sangaku0418.hatenablog.com/entry/2021/09/08/191020より取得しました。


家紋シリーズ 輪違い(2) 丸に輪違い

# 家紋シリーズ 輪違い(2) 丸に輪違い

plotter.jl を include

sangaku0418.hatenablog.com

include("plotter.jl")

# 塗りつぶしリングを描く
function plotring(x, y, r1=1.0, r2=0.9; startangle=0, endangle=360, fcol=:black)
    r1, r2 = max(r1, r2), min(r1, r2)
    θ = startangle:endangle;
    coordx = cosd.(θ);
    coordy = sind.(θ);
    plotpolygon(x .+ vcat(r1 .* coordx, r2 .* reverse(coordx)), y .+ vcat(r1 .* coordy, r2 .* reverse(coordy)), col=fcol, lwd=0, fcol=fcol)
end

function maruniwatigai(; r=1, r1=1.25r, r2 = 0.95r, width=400, height=400)
    plotbegin(w=width, h=height)
    plotring(0, 0, 2.2*r, 1.8*r, fcol=:black)
    plotring( 0.5r, 0, r1, r2, fcol=:black)
    plotring(-0.5r, 0, r1, r2, fcol=:black)
    plotring( 0.5r, 0, r1+0.03r, r1, startangle=110, endangle=150, fcol=:white)
    plotring( 0.5r, 0, r2-0.03r, r2, startangle= 90, endangle=130, fcol=:white)
    plotring(-0.5r, 0, r1+0.03r, r1, startangle=290, endangle=330, fcol=:white)
    plotring(-0.5r, 0, r2-0.03r, r2, startangle=270, endangle=310, fcol=:white)
    plotend()
end

maruniwatigai()




以上の内容はhttps://sangaku0418.hatenablog.com/entry/2021/09/08/191020より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14