Plotting Unit Vectors

I want to plot unit vectors whose orientation varies from [-pi, pi]. A reference figure is below.
Screenshot 2020-04-17 at 12.00.11 PM

Any suggestions on how I can get the desired plot?

using LazySets, Plots

plot(map(p -> LineSegment(zeros(2), p), PolarDirections(16)), lw=2.,
     arrow=:true, markershape=:none, seriestype=:path)
plot!(Ball2(zeros(2), 1.0), alpha=.1, ratio=1.)

Of course, you may want to use Plots directly; all the keyword arguments used above apply.

7 Likes