家紋シリーズ 三つ巴(左三つ巴,右三つ巴)
左三つ巴は direction=:left (デフォルト)
右三つ巴は direction=:right
subuunig=true は他の描画プログラムの下請けで呼ばれるときで,plotbegin(), plotend() を呼ばない
plotter.jl を include
https://blog.goo.ne.jp/r-de-r/e/bd71a52a09801335d56f7c47d879bfe3
include("plotter.jl")
function mitudomoe(; r=1, direction=:left, subunit=false, width=400, height=400)
!subunit && plotbegin(w=width, h=height)
θ = atand(sqrt(3)/2)
p1, p2, p3, p4 = direction == :left ?
(-30, 90, -θ, 90) :
(90, 210, 90, 210 + θ)
for i = 0:2
plotcircle(0, 0, 320r, startangle=120i+p1, endangle=120i+p2,
lwd=3, fcol=:black)
plotcircle(128r*cosd(120i+90), 128r*sind(120i+90), 192r,
startangle=120i+p3, endangle=120i+p4, lwd=0, fcol=:white)
end
for i = 0:2
plotcircle(174r*cosd(120i-30), 174r*sind(120i-30), 146r,
lwd=0, fcol=:black)
end
!subunit && plotend()
end
mitudomoe()
mitudomoe(direction=:right)