total refactoring of alyTrap, especially recursion replaced with iteration; new: update_trapezoids