# Boxes in Frustum

This topic is 3032 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So I have a infinite grid in 2D space. I also have a camera position and camera field-of-view (FOV) angle. I already know how to determine is a grid is inside the FOV.

The problem is that I am trying to collect all the grid points that exist within the FOV that is also less than X-distance away from the camera.

Here is an image to illustrate the problem:

Things that are given:
1. Camera position (and which grid it is in), it's facing diection as well as its FOV
2. Max distance a grid can be away from the camera

I can do a brute force method but it just seems so computationally inefficient. Anyone have any good ideas? I appreciate any help.

[Edited by - phishtree on August 24, 2010 6:56:30 PM]

##### Share on other sites
This is actually much simpler than it first seems. I recommend reading this:
Rasterization on Larrabee. It covers the basic idea of finding which tiles are on a side of a line. They use a 4x4 grid, but you'll want to use a quadtree with look-up tables.

If that article confuses you then I'll explain a very similar method that isn't as extensively optimized:

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 10
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633682
• Total Posts
3013314
×