Date

等距描点画图

\begin{align} \Delta l&=\sqrt{\Delta x^2+\Delta y^2}=C\\ \Rightarrow \Delta x&=\frac{\Delta l}{\sqrt{1+y'^2}} \end{align}

等角描点画图

\begin{align} \theta&=\arctan\frac{\Delta y}{\Delta x}\\ \delta\theta&=C\\ \Rightarrow \Delta x&=\delta\theta\Big/\frac{y''}{1+y'^2} \end{align}

In [1]:
def tannan(x, bound=6):
    t=tan(x)
    if abs(t)>bound:
        return nan
    else:
        return t
tann=vectorize(tannan)
x=arange(0,9*pi/2,pi/100)
plot(x,tann(x));

Comments

comments powered by Disqus