build on-demand data structures to speed up angle queries