Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!deblil.Eng.Sun.COM!stephenj From: stephenj@deblil.Eng.Sun.COM (Stephen Johnson) Newsgroups: comp.graphics Subject: newell plane equation Keywords: graphics, plane eqation Message-ID: <9283@exodus.Eng.Sun.COM> Date: 7 Mar 91 03:50:34 GMT Sender: news@exodus.Eng.Sun.COM Lines: 33 I have been using the Newell technique for computing the plane equation in the form: Ax + By + Cz + D = 0 and I discovered that the plane defined by the following points is computing incorrectly: (2,2,0), (12,2,0), (2,2,3), (12, 2, 3) From "Procedural Elements for Computer Graphics" bu David F. Rogers, page 209, the Newell equations are In the loops: if (i == n) j = 1 else j = i + 1 A = SUM(y[i] - y[j]) * (z[i] + z[j]) for i = 1 to N B = SUM(z[i] - z[j]) * (x[i] + x[j]) for i = 1 to N C = SUM(x[i] - x[j]) * (y[i] + y[j]) for i = 1 to N D = (A * x[0] + B * y[0] + C * z[0]) Unfortunately, with the previously mentioned points: A = (0 * 0) + (0 * -3) + (0 * 0) + (0 * 3) = 0 B = (0 * 14) + (-3 * 14) + (0 * 14) + (3 * 14) = 0 C = (-10 * 0) + (10 * 0) + (-10 * 0) + (10 * ) = 0 Oops, by inspection we can see that the equation for this plane is y = -2. So, what's wrong? Has someone noticed this before and fixed it. Thanks for the Advice, Stephen Johnson