Calculating number of pixels seen???

Hi All,

I am trying to figure out the math used to calculate the number of pixels seen given a specific camera position, and field of view.

For example, First my camera is at 0,0,-5 and I am looking at 0,0,0 and Y is up. Second, my FOV is 80 degrees. Third, all objects/pixels are drawn on the x,y plane at a Z depth of 0. Fouth, my screen resolution is 1024*768 (not sure this is important).

How would I calculate the X position where an object would enter my FOV and the X position where it would leave my FOV. Then calculate the same for Y?

Any help is appreciated!
jpummill

if i got it right, it is not the number of pixels visible you want to calculate but objects visible to your camera?

if my thoughts prove right you should try a search on http://www.google.com for ‘frustum culling’

i just reread your post
if you understand the math for frustum culling it should be easy to use this to solve your specific problem
since you are working in 2d it should be really easy

hope i could help

[This message has been edited by satan (edited 04-07-2002).]

http://www.gametutorials.com
has a tut on Frustum culling