# The Industry's Foundation for High Performance Graphics

1. ## how to Calculate the Irradiated area?

in Three-dimensional space， i know the positon of camera and Target point，how to Calculate the Irradiated area on Plane with z=0?

2. What irradiated area? Do you want to know how large the visible area of the xy-plane (z = 0) is?

3. Originally Posted by thokra
What irradiated area? Do you want to know how large the visible area of the xy-plane (z = 0) is?
yes!! how can i do it ?

4. Originally Posted by yanasdf789
yes!! how can i do it ?
lol it's a joke yanasdf789
The xy-plane(z=0) is infinite, like all planes of "space" (dimension(s) >= 1).

5. Irradiated area on Plane with z=0 ... mmmMMMmm ...
you want to compute the area of the projection of the xy-plane (z=0) on the near plane of your camera ?

6. Irradiated area on Plane with z=0 ... mmmMMMmm ... you want to compute the area of the projection of the xy-plane (z=0) on the near plane of your camera ?
Hence the term "visible" ... The OP wants to know how large the visible area of the XY plane is - depending on the current parameters of the camera.

yanasdf789: is your camera always orthogonal to the plane or not?

7. Originally Posted by thokra
Hence the term "visible" ... The OP wants to know how large the visible area of the XY plane is - depending on the current parameters of the camera.

yanasdf789: is your camera always orthogonal to the plane or not?
if I know the the current parameters of the camera and camera always orthogonal to the plane,how to compute the area of the projection of the xy-plane (z=0)

8. Originally Posted by yanasdf789
if I know the the current parameters of the camera and camera always orthogonal to the plane,how to compute the area of the projection of the xy-plane (z=0)
For a centred perspective projection:

The height is 2 * camera_z * tan(fovy/2)
The width is 2 * camera_z * tan(fovy/2) * aspect
The area is (2 * camera_z * tan(fovy/2))2 * aspect.

Where camera_z is the Z coordinate of the camera's position, and fovy and aspect are the corresponding parameters to the gluPerspective() call.

For a generalised perspective projection:

The height is (top - bottom) * camera_z / nearVal
The width is (right - left) * camera_z / nearVal
The area is (right - left) * (top - bottom) * (camera_z / nearVal)2

where camera_z is the Z coordinate of the camera's position, and the other variables are the corresponding parameters to the glFrustum() call.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•