# bat functions: semicircle, ellipse, shoulders, bottom, cowl# harmless Compat.UTF8String warnings from julia kernel on first runσ(x)=sqrt.(1-x.^2)e(x)=3σ(x/7)s(x)=4.2-.5x-2.8σ(.5x-.5)b(x)=σ(abs.(2-x)-1)-x.^2/11+.5x-3c(x)=[1.7,1.7,2.6,.9];

2

In [2]:

# the first time in a project, it can take over a minute to precompile PyPlotusingPyPlot

3

In [3]:

# plot symmetrically across y-axiso(x,f)=plot(-x,f(x),color="black"),plot(x,f(x),color="black")p(x,f)=o(x,t->f.(t))# broadcast must be explicitp((3:.1:7),e);p(4:.1:7,t->-e(t))# ellipsep(1:.1:3,s);p(0:.1:4,b)# shoulders and bottomo([0,.5,.8,1],c);# cowl is piecewise linear