
A plane is infinite so we can only draw part of a plane. It like saying drawing a ray. We can only draw a line segments that is part of a ray. What I have given below draws a triangle that is part of the plane. It will draw the part of the plane closest to the origin.
This is what just came to my mind. Please correct me if I am wrong. My explanations as to why I am doing each step is beside each line
// Given N = normal of the plane d = distance of the plane fMul = some number depending on how big you want the triangle
// To draw a traingle on the plane
// Algo v1 = N * d // Find one point on the plane. This is the point closest to the origin vUp = (0.0f, 1.0f, 0.0f) //Create a vector pointing up v2 = Cross(v1, vUp) // Taking the cross product will result in a vector parallel to the plane Normalize(v2) // Normalize this vector v3 = v2 // make a copy for use later v2 *= fMul // Multiply it based on the desired size v2 += v1 // Add this point to v1 so the point lies on the same plane v3 = Cross(N, v3) // now take the cross product of the plane normal and v3. we will get a vector that is perpendicular to the 2 and also is parallel to the plane Normalize(v3) // normalize this too v3 *= fMul // multiply this too by the mutiplier v3 += v1 // Add this point to v1 so the point lies on the same plane DrawTri(v1, v2, v3) // Traw a triangle from the 3 points.
This will create a right angled triangle with the right angle at v1. You should be able to create a quad if you understood the algo above
hope this helps.
 Sid
