   Building planes for quadtree sorting
  I’d like to build a plane to sort objects into quadtrees.  Here is how the scene is set up (standard x-axis = x, standard y-axis =z):  Coordinates in (x, z)(min, max)(max, max)______________________|  ||  ||  ||  ||  ||_____________________|(min, min)(max, min)So then I build two planes, one that stretches through (x avg, max) and (x avg, min) and another through (max, z avg) and (min, z avg).How do I put these planes into Ax+By+Cz+D=0 form?Thanks! 
  Any book on Calculus & Analytic Geometry has the answer... check your local library, or if you can''t make it there, check Google for Equation of a plane.Timkin ;  Ok, what I've gathered is that a plane's A, B and C are the X, Y and Z (respectively) coordinates of the plane's normal.D is then equal to (A,B,C) DOT (X,Y,Z), where X, Y and Z are a point on the plane.  Is that correct so far?Assuming that's true, my code becomes: // X splitting planexPlane[0]=xMax;// X = max X valuexPlane[1]=(yMin+yMax)/2;// Y = avg Y valuexPlane[2]=(zMin+zMax)/2;// Z = avg Z valuexPlane[3]= -1*( ((xMin+xMax)/2)*xPlane[0] + ((yMin+yMax)/2)*xPlane[1] + ((zMin+zMax)/2)*xPlane[2]);// D = normal.dot(known point)// Z splitting planezPlane[0]=(xMin+xMax)/2;// X = X avgzPlane[1]=(yMin+yMax)/2;// Y = avg Y valuezPlane[2]=zMin;// Z = min Z valuexPlane[3]=-1 * ( ((xMin+xMax)/2)*zPlane[0] + ((yMin+yMax)/2)*zPlane[1] + ((zMin+zMax)/2)*zPlane[2]);// D = normal.dot(known point)Is that correct?  If you don't get it, try drawing it out.Thanks!EDIT: Yeah, this code definitely isn't working for me.... the nodes sometimes get into this state where they keep passing the same objects down and down and down since the planes aren't partitioning like they're supposed to.   [edited by - sirSolarius on February 12, 2004 8:41:45 PM];  You really should get yourself a book on Calculus and Analytic Geometry... I don''t know why I''m answering such a question... it must be because it''s Friday and I''m avoiding work!First, let''s assume the following form for the scalar equation of the plane: A(x-X)+B(y-Y)+C(z-Z)=0quote:Original post by sirSolarius  Ok, what I''ve gathered is that a plane''s A, B and C are the X, Y and Z (respectively) coordinates of the plane''s normal.Yes.quote:Original post by sirSolarius  D is then equal to (A,B,C) DOT (X,Y,Z), where X, Y and Z are a point on the plane.  Is that correct so far?No, rearranging the above scalar equation to have Ax + By +Cz + D  = 0 would mean that D = -N.R  , where R   = < X,Y,Z >; the vector to the coordinates of the normal, N  .If that doesn''t cure your problem, then holler and I''ll go through your code (you really should post pseudo-code, rather than language specific code... it scares off a lot of readers that might otherwise have provided you with an answer).Cheers,Timkin 