家紋シリーズ 梅(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()