properly sampling and calculating angles between sampled points