Majority-Logic Synthesis by Geometric Methods