refatored code to generate lpdas with an arbitrary angle