家紋シリーズ 雁金(1) 丸に雁金
これはもはや,自由曲線のみでの描画。
# plotter.jl を include
# https://blog.goo.ne.jp/r-de-r/e/bd71a52a09801335d56f7c47d879bfe3
# bezier 曲線の関数は,以前のプログラム例を参照
include("plotter.jl")
function karigane(; r=1, width=400, height=400)
plotbegin(w=width, h=height)
xy1 = bezier([550 709; 508 751; 476 776; 441 793; 399 814;
360 826; 328 834; 266 839; 165 835; 130 828;
88 811; 67 797; 46 786; 25 776; 0 762])
xy2 = bezier([550 709; 522 709; 473 712; 413 709; 374 705;
339 698; 307 688; 272 673; 243 663; 215 645;
183 624; 148 596; 124 571; 99 539; 78 515;
53 476; 35 441; 14 398; 5 370])
xy3 = [0 762; 0 356]
x = vcat(xy1[:, 1], xy3[:, 1], reverse(xy2[:, 1]))
y = vcat(xy1[:, 2], xy3[:, 2], reverse(xy2[:, 2]))
plotpolygon(x , y, lwd=0, fcol=:black)
plotpolygon(-x, y, lwd=0, fcol=:black)
xy4 = vcat(bezier([0 1018; 46 1016; 81 1010; 106 985; 130 970;
148 949; 173 899; 176 846; 176 740]),
[176 740; 0 740; 0 1030])
plotpolygon(xy4[:, 1] , xy4[:, 2], lwd=0, fcol=:black)
plotpolygon(-xy4[:, 1] , xy4[:, 2], lwd=0, fcol=:black)
xy5 = bezier([172 826; 130 824; 88 808; 67 797; 46 788;
25 776; 0 762])
plotline(xy5[:, 1], xy5[:, 2], lwd=2, col=:white)
plotline(-xy5[:, 1], xy5[:, 2], lwd=2, col=:white)
plotcircle(-46, 930, 26, lwd=1.7, col=:white)
plotcircle(-46, 930, 12, col=:white, lwd=0, fcol=:white)
xy6 = bezier([-71 853; -49 846; -39 839; -21 840; 3 850; 18 860;
28 874; 39 892; 39 910; 42 934])
plotline(xy6[:, 1], xy6[:, 2], lwd=2, col=:white)
plotpolygon([-247, -166, -154], [888, 904, 865],
lwd=2, col=:white, fcol=:black)
plotpolygon([-247, -154, -183], [888, 863, 831],
lwd=2, col=:white, fcol=:black)
plotring(0, 702, 702, 569)
plotend()
end
karigane()