Path: utzoo!attcan!uunet!samsung!dali.cs.montana.edu!uakari.primate.wisc.edu!uflorida!haven!decuac!bacchus.pa.dec.com!hollie.rdg.dec.com!ryn.esg.dec.com!allvax.enet.dec.com!jroth From: jroth@allvax.enet.dec.com (Jim Roth) Newsgroups: comp.graphics Subject: Re: How to determine 4 points in a 3D plane?? Message-ID: <3299@ryn.esg.dec.com> Date: 24 Oct 90 23:00:21 GMT Sender: guest@ryn.esg.dec.com Organization: Digital Equipment Corporation Lines: 26 In article <31644@netnews.upenn.edu>, sichen@grasp.cis.upenn.edu (the S T R A N G E R ???!!!) writes... > I am looking for the algorithm (pseudocode is fine) to determine any 4 given >abitrary points p(x,y,z) that lie in the same plane...e.g. The algorithm should >work for the following points .. > a) p1=[1,1,0] p2=[0,2,1] p3=[1,0,2] p4=[3,-1,2] > b) p1=[4, 2, 1] p2=[0, -3, 4] p3=[2, 0, 3] p4=[1, 4, 1] It's unclear what you want - in both of your cases, the points aren't coplanar. If you need a predicate that tests if points lie on a plane or not, try evaluating the determinant | x1 y1 z1 1 | | x2 y2 z2 1 | | x3 y3 z3 1 | | x4 y4 z4 1 | This is zero, or nearly so, if the points lie on the same plane. In fact, it is 6 times the volume of a tetrahedron with the given 4 vertices (in homogenous coordinates.) - Jim