Path: chuka.playstation.co.uk!news From: "Graeme Evans" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Quirky Maths Prob Date: Thu, 22 Jan 1998 20:15:57 -0000 Organization: Yaloozer Lines: 34 Message-ID: <6a8935$722@chuka.playstation.co.uk> References: <01bd2751$acaa0620$cc3163c3@default> NNTP-Posting-Host: fourny.demon.co.uk X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 I think this is a simultaneous equations problem What you want to find is the equation of the plane Z=aX+bY+c then rearrange it in the form Y=(Z-aX-c)/b All you need to find are the variables a, b and c. You have three equations z1 = ax1 + by1 + c z2 = ax2 + by2 + c z3 = ax3 + by3 + c So you have enough pairs of simultaneous equations to solve for a, b and c And the answer is; b = -(-z2*x3+z2*x1+x2*z3-x2*z1+z1*x3-x1*z3)/ (-x2*y3+x2*y1+y2*x3-y2*x1+x1*y3-y1*x3) a = (z3*y2-z3*y1-y3*z2+y3*z1-z1*y2+y1*z2)/ (-x2*y3+x2*y1+y2*x3-y2*x1+x1*y3-y1*x3) c = (-y3*x2*z1+z1*y2*x3-z3*y2*x1+y3*z2*x1-y1*z2*x3+z3*x2*y1)/ (-x2*y3+x2*y1+y2*x3-y2*x1+x1*y3-y1*x3) heh heh Graeme