A quasi-analytic method for structural optimization