"""Original free-streamline and hodograph plot. Python3.14, NumPy, Matplotlib. Output CWD.""" import matplotlib matplotlib.use("Agg") import numpy as np import matplotlib.pyplot as plt a=.5;t=np.linspace(-np.pi+1e-7,-.002,2000) x=-a/np.pi*(np.log(1-np.cos(t))+np.cos(t)-np.log(2)+1) y=1-a/np.pi*(t+np.pi+np.sin(t)) right=1.1;mask=x",color="#176858",lw=2)) ax.set(xlim=(-.55,right),ylim=(-.05,1.5),xlabel=r"$x$",ylabel=r"$y$",title="Physical plane") ax.set_aspect("equal");ax.spines[["top","right"]].set_visible(False) ang=np.linspace(0,np.pi,300);qx=np.cos(ang);qy=np.sin(ang) bx.fill(np.r_[qx,-1],np.r_[qy,0],color="#d8eef7") bx.plot(qx,qy,color="#2166ac",lw=2.5);bx.plot([-1,1],[0,0],color=".25",lw=2) bx.scatter([-1,0,1],[0,0,0],s=25,color=".2",zorder=5) bx.text(-1,-.18,"D",ha="center",fontsize=12);bx.text(0,-.18,"A, E",ha="center",fontsize=12) bx.text(1,-.18,"B, C",ha="center",fontsize=12) bx.text(-.45,.45,r"$q=e^{-i\theta}$",fontsize=13) bx.annotate("",(.6,.8),(.15,.99),arrowprops=dict(arrowstyle="->",color="#2166ac",lw=2)) bx.set(xlim=(-1.2,1.2),ylim=(-.3,1.25),xlabel=r"$\operatorname{Re}q=u$", ylabel=r"$\operatorname{Im}q=-v$",title="Velocity plane") bx.set_aspect("equal");bx.spines[["top","right"]].set_visible(False) fig.suptitle("A horizontal lip gives a one-half canal contraction",fontsize=14) fig.tight_layout();fig.savefig("2008-canal-flow.png",dpi=150,facecolor="white")