def mec_test():
    th0, th1 = 0, 4 / pi
    fnl = mk_ths_fnl(th0, th1)
    params = solve_mec_nested(th0, th1, fnl)
    k, lam1, lam2 = params
    xys, cost, x, y, th = run_mec_cos(k, lam1, lam2, 1000)
    plot(xys)
    print '% run_mec_cos:', cost, x, y, th
    print '1 0 0 setrgbcolor'
    xys, cost, x, y, th = run_elastica(-.5, .5, k, lam1, lam2)
    print '%', xys
    plot(xys)
    print '% run_elastica:', cost, x, y, th
    print 'showpage'
    print '%', params
dataset/ETHPy150Open google/roboto/third_party/spiro/curves/mecsolve.py/mec_test/swapped operands of `/`