equal-angle algorithm