   frustum
  how do i determine the coordinates of the far and near clipping planes relative to the camera position?   
  I assume that by the "plane coordinates" you mean the plane coeficients(a,b,c,d). You can compute them fairly simple, [a,b,c] is simply the normalized look vector of your camera, you can compute the D coeficient by inserting a point lying on the near plane into the plane equation(aX + bY + cZ + d = 0), where [X,Y,Z] is a point on the near plane. You can get the point on the plane by adding the normalized look vector multiplied by nearZ to the cam position:point_on_plane_near_plane = cam_pos + cam_look_normalized * nearZ;for far plane it is the same, [a,b,c] is the normalized look vector and the point is calculated as follows:point_on_plane_far_plane = cam_pos + cam_look_normalized * farZ;   ;  let me clarify a little bit. suppose i have the camera position and the distances of the far and near clipping planes[all Z values]. i would like to draw the frustum/frustum cone. my question is how do i calculate the four corners of each of the far and near clipping planes?? below is a code fragment that i don't understand.....:(double xcam_1 = 0., ycam_1 = 8., zcam_1 = 10.; //Camera positiondouble xfoc_1 = 0., yfoc_1 = 0., zfoc_1 = 0.;//Focal point positiondouble fovy_1 = 40.; //Viewing angledouble far_1 = 1.8*xyzmax_1;    //Inital distance of the far clipping planedouble near_1 = 1.;   //Initial dist'n of the near clipping planeint    winHeight_1 = 721*3/4;   //The default height of the windowint    winWidth_1 = 1024*3/4;   //The default width of the windowvoid frustum(){double  a = xfoc_1 - xcam_1,  b = yfoc_1 - ycam_1,  c = zfoc_1 - zcam_1;double  v = sqrt(b * b + c * c);double  alpha = atan( b/c)*180./3.1416;double  beta = -atan(a/v)*180./3.1416;double  width;if (showCamera_1) width = winWidth_1-(winHeight_1/2.);else width = winWidth_1;double  g = far_1,  h = g * tan(fovy_1/2*(width/winHeight_1)* 3.1416/180.);double  e = near_1, f = e * tan(fovy_1/2. * 3.1416/180.);glBegin( GL_LINES);glVertex3f( 0., 0., 0.);glVertex3f( -f, -f, e);glVertex3f( 0., 0., 0.);glVertex3f( -f, f, e);glVertex3f( 0., 0., 0.);glVertex3f( f, -f, e);glVertex3f( 0., 0., 0.);glVertex3f( f, f, e);glEnd();glBegin( GL_QUADS);glColor4f( .1, .2, .4, 0.4);glVertex3f( -f, f, e);glVertex3f( -h, h, g);glVertex3f( h, h, g);glVertex3f( f, f, e);glVertex3f( -f, -f, e);glVertex3f( -h, -h, g);glVertex3f( h, -h, g);glVertex3f( f, -f, e);glColor4f( .2, .4, .1, 0.4);glVertex3f( -f, f, e);glVertex3f( -h, h, g);glVertex3f( -h, -h, g);glVertex3f( -f, -f, e);glVertex3f( f, f, e);glVertex3f( h, h, g);glVertex3f( h, -h, g);glVertex3f( f, -f, e);glEnd(); }the output is like a frustum cone. hope i'm not confusing too much. how do i send attachments so that u could take a look at the source. thank you for your reply.;  Another way is to multiply the corners of the unit cube by the inverse of the ViewProj Matrix.GetFrustumPoints(VEC3* vOut8Points, const D3DXMATRIX* pMatViewProj){    D3DXMATRIX inv;D3DXMatrixInverse( &inv, NULL, pMatViewProj );VEC3 vUnitCube[8] = { VEC3(1,1,-1),VEC3(1,-1,-1),VEC3(-1,-1,-1),VEC3(-1,1,-1),  VEC3(1,1, 1),VEC3(1,-1, 1),VEC3(-1,-1, 1),VEC3(-1,1, 1) };D3DXVec3TransformCoordArray( vOut8Points,  sizeof(VEC3),   vUnitCube, sizeof(VEC3), &inv, 8 );}You have 8 points then. The first 4 define the near-quad, and the latter 4 the far-quad.   ;  vokuhila, are you using an OpenGL-style projection matrix with D3D? If you're not, I suspect you need to change your z=-1's to z=0's...;  You are right Rompa. The z's of the first four vectors have to be 0.Wasn't a problem for my game, but it's good to have it right.Thank you.   