I'm looking to slice a 90 degree section, 45 degrees either side of origin along an axis, out of a 270 degree point cloud from a lidar scan using PCL. My thinking so far would be to look for two points (in the x and z directions in my case, as these axes represent the horizontal and depth directions respectively) whose ratio matches the tangent of 45 degrees.
However I'm not sure how to go about this in an efficient way; I was thinking of using a kd tree, but I'm not sure how to search it for a ratio of two points/two points that have the ratio.
Does anyone know how to go about this, or perhaps have a better method of doing it?
Thanks!