I wanted to draw the Yin-Yang symbol in Luxor.jl.
Here’s what I came up with. Can this be done more idiomatic?
I would have preferred the white “eye” of the black “fish” to be just a cut-out rather than over-plotting with white. However, I was not able to figure out how.
using Luxor
R = 128
@png begin
move(Point(0,-R)) # start at top
arc(Point(0,0), R, -pi/2, pi/2, :path) # right side arc to bottom
arc(Point(0,R/2), R/2, pi/2, -pi/2, :path) # small arc up
carc(Point(0,-R/2), R/2, pi/2, -pi/2,:path) # small arc counter-clockwise
fillpath()
circle(Point(0,0), R, action=:stroke) # large circle
circle(Point(0,-R/2), R/8, action=:fill) # white fish eye
sethue("white")
circle(Point(0,R/2), R/8, action=:fill) # black fish eye
end

