home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / sci / math / 17520 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.7 KB  |  34 lines

  1. Newsgroups: sci.math
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!bronze.ucs.indiana.edu!dhart
  3. From: dhart@bronze.ucs.indiana.edu (dave hart)
  4. Subject: Re: Projecting a vector onto a plane
  5. Message-ID: <C03DJn.Jy6@usenet.ucs.indiana.edu>
  6. Sender: news@usenet.ucs.indiana.edu (USENET News System)
  7. Nntp-Posting-Host: bronze.ucs.indiana.edu
  8. Organization: Indiana University
  9. References: <1992Dec17.150409.13943@bert.eecs.uic.edu> <1992Dec17.161552.7160@sophia.smith.edu>
  10. Date: Wed, 30 Dec 1992 21:40:34 GMT
  11. Lines: 21
  12.  
  13. In article <1992Dec17.161552.7160@sophia.smith.edu> orourke@sophia.smith.edu (Joseph O'Rourke) writes:
  14. >In article <1992Dec17.150409.13943@bert.eecs.uic.edu> barnes@bert.eecs.uic.edu (Craig Barnes) writes:
  15. >>
  16. >>How do I project an arbitrary
  17. >>vector on to a plane defined by two other vectors?
  18. >
  19. >Call the arbitrary vector V, and the two vectors in the plane A and B.
  20. >Here is one method.  Compute a normal N to the plane by crossing
  21. >A and B:  N = A x B.  Make this a unit normal n.  Project V onto this 
  22. >normal with the dot product: d = V . n.  Now your unknown vector U
  23. >plus (d n) must give V.  So U = V - d n.
  24.  
  25.  
  26.     You could also look at it as a "least squares" problem [finding best
  27. approximation in plane spanned by A, B]. You want V = x_1 * A + x_2 * B, for scalar
  28. x_i, or X*x = V, where X is the matrix with columns A, B and x is the vector of x_i's.
  29. The standard least squares "solution" [see for example Strang's Applied Math] is 
  30. the solution of tX*X*x = tX*V, so
  31.     x = (tX*X)^(-1)*(tX*V), where tX means transpose X,
  32. and U = X*x = etc.  [and actually computing an inverse to solve is *bad form* ;-]
  33.     I haven't done an operation count on it, lately...
  34.