def plot_test(px, py, thick=2):
    from pylab import plot
    tt = linspace(0, 1, 50)
    dpx = polyder(px)
    dpy = polyder(py)
    dL2 = (polymul(dpx, dpx) + polymul(dpy, dpy))
    ux = polyval(px, tt)
    uy = polyval(py, tt)
    dx = diff(ux)
    dy = diff(uy)
    dx = r_[(dx[0], dx)]
    dy = r_[(dy[0], dy)]
    dL = sqrt(((dx ** 2) + (dy ** 2)))
    plot(ux, uy, '.-')
    plot((ux + ((thick * dy) / dL)), (uy - ((thick * dx) / dL)), '-')
    plot((ux - ((thick * dy) / dL)), (uy + ((thick * dx) / dL)), '-')
def plot_test(px, py, thick=2):
    from pylab import plot
    tt = linspace(0, 1, 50)
    dpx = polyder(px)
    dpy = polyder(py)
    dL2 = (polymul(dpx, dpx) + polymul(dpy, dpy))
    ux = polyval(px, tt)
    uy = polyval(py, tt)
    dx = diff(ux)
    dy = diff(uy)
    dx = r_[(dx[0], dx)]
    dy = r_[(dy[0], dy)]
    dL = sqrt(((dx ** 2) + (dy ** 2)))
    plot(ux, uy, '.-')
    plot((ux + ((thick * dy) / dL)), (uy - ((thick * dx) / dL)), '-')
    plot((ux - ((thick * dy) / dL)), (uy + ((thick * dx) / dL)), '-')