def lenfig():
    print '306 720 translate'
    th0, th1 = pi / 2, 2 / pi
    for i in range(1, 10):
	y = .1 * i + .003
	fnl = mk_y_fnl(th0, th1, y)
	params = solve_mec_3constr(fnl)
	k, lam1, lam2 = params
	print 'gsave 0.5 dup scale -306 -396 translate'
	xys, cost, x, y, th = run_elastica(-2, 2, k, lam1, lam2, 100)
        print 'gsave [2] 0 setdash'
	plot(xys)
        print 'grestore'
	xys, cost, x, y, th = run_elastica(-.5, .5, k, lam1, lam2, 100)
	plot(xys)
	print 'grestore'
        print '% y =', y, 'params =', params
        if lam2 < 0:
            mymaxk = k
        else:
            mymaxk = sqrt(k * k + 4 * lam2)
        lam = abs(lam2) / (mymaxk * mymaxk)
        print '-200 0 moveto /Symbol 12 selectfont (l) show'
        print '/Times-Roman 12 selectfont ( = %.4g) show' % lam
	print '0 -70 translate'
    print 'showpage'
dataset/ETHPy150Open google/roboto/third_party/spiro/curves/mecsolve.py/lenfig/swapped operands of `/`