projection Onto Plane.

``` BBS: Inland Empire Archive
Date: 05-10-92 (10:01)             Number: 158
From: PAUL LEONARD                 Refer#: NONE
To: RICH GELDREICH                Recvd: NO
Subj: projection Onto Plane.         Conf: (2) Quik_Bas```
```On or about <May 09 16:05>, Paul Leonard (1:105/48.111) scribbled:

PL> Given three points to describe the plane P1(x1,y1,z1), P2(x2,y2,z2)
PL> and P3(x3,y3,z3), the center point of the rectangle they form has
PL> coordinates

PL> ( (x1+2*x2+x3)/4, (y1+2*y2+y3)/4, (z1+2*z2+z3)/4 )

Bzzzzt - wrong answer.  Sorry, Rich.  The center point
coordinates are determined by finding the midpoint of the
diagonal formed by P1P3...

( (x1+x3)/2, (y1+y3)/2, (z1+z3)/2 )

...Please substitute these coordinates for Pm(xm,ym,zm).

PL> z = zm + (-z1ym+x1y2+xmy1-x2y1)*t

Also, there's a typo in the parametric equation for z.  It should be...

z = zm + (-x1ym+x1y2+xmy1-x2y1)*t

...The first term in the coefficient of t isn't "-z1ym."

If you solve the equations for the example i gave
[P1(0,2,0), P2(2,2,0) and P3(2,0,0)] (which is how i found
the "bugs"), you get Pm(1,1,0) and

64^2 = (x-1)^2 + (y-1)^2 + (z-0)^2

and

x = 1
y = 1
z = 6*t

By substitution, 64^2=(6*t)^2 or 6*t=64, so z=64.  So the
point you're looking for in this example is...

P(1,1,64)

...(-64 is also valid for z).  Again, ta-dah (which is English for QED). :)

ptl

--- msged 2.07
* Origin: PTL Pointwork (1:105/48.111)
```

Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET