Re: [Algorithms] decompose onto non-orthogonal vectors
Brought to you by:
vexxed72
From: Jonathan B. <jo...@bo...> - 2000-07-15 02:34:19
|
"Discoe, Ben" wrote: > > I thought it would be a simple problem, but all usual sources failed to > answer, so perhaps it will be obvious to someone on this list. > > Given a point p and two unit vectors a and b like this: > > b > / > v/----p > / / > / / > / / > ---------a > u > > how to you get scalars (u,v) such that u*a + v*b = p? > Ie. decompose p onto a and b. This is one of those "fundamental linear algebra things" that Ron and I were just talking about. Your original coordinates of 'p' are in the coordinate system that we are used to, that is, two basis vectors that are orthonormal. We will call this space R. You want the coordinates of 'p' in a system in which the vectors are unit, but not orthogonal. We will call this space S. Just build a transformation matrix from R to S, and call that matrix T. Then p' = Tp and you are done. For instructions on how to make a matrix that goes from one space to another, given the basis vectors of each space, consult any one of a trillion graphics books. -J. > I promise i consulted an academic What kind of academic was that? |