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

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 ?

lol it’s a joke yanasdf789

The xy-plane(z=0) is infinite, like all planes of “space” (dimension(s) >= 1).

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 ?

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?

[QUOTE=thokra;1253086]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?[/QUOTE]

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.