I’ve a given infinite digicam frustum outlined by 4 planes, every outlined by a traditional (left, proper, backside, prime). From these planes we are able to additionally simply get the digicam place and the view route. Additional, I’ve an infinite cone specified by its apex, a route vector, and the interior angle. I have to examine whether or not these two intersect.
(Geogebra. The picture and Geogebra playground use an infinite cone in each instructions, however this query is a few cone solely in a single route!)
There are some trivial particular instances. The apex being contained in the frustum, or the digicam being contained in the cone, are each simple to check for and end result within the reply true. Additionally, if the view route and cone route are sufficiently aligned, they can even essentially intersect in some unspecified time in the future, even when digicam pos and apex are far aside. Else, if the apex is "behind" the digicam (dot(apex - camera_pos, view_dir) < 0) and if the cone factors in a very completely different route (dot(view_dir, cone_dir) < 0), then there is no such thing as a intersection.
However I am unable to give you a normal resolution. It is difficult as a result of an intersection between each does not indicate any of this:
- Any of the 4 plane-intersection-lines intersect the cone.
- The axis of the cone intersects the frustum.
- The cone and look at dir pointing in roughly the identical route.
Merely checking whether or not the cone intersects any particular person aircraft can also be not ample as that will have many false positives.
I attempted the strategy of intersecting the cone with one aircraft first, discovering the intersection level that is closest to … one thing, such that I can merely check that intersection level towards all different planes. However that hasn’t lead anyplace but.
I additionally acquired one other thought: I feel there are solely three intersection instances: (a) cone axis intersects frustum, or (b) any frustum edge intersects the cone, or (c) the angle between cone axis and any frustum aircraft is smaller than the cone’s interior angle. Is that right?
I additionally admire helpful approximations in solutions!


