Re: Stable finding of orthogonal vector to a normal in 3D?
- From: palazzol <fpalazzol@xxxxxxxxx>
- Date: Fri, 05 Oct 2007 13:53:50 -0700
Ok - I spoke too soon. This didn't work for me. It gives three
orthogonal vectors, but none parallel to b, only to v? :(
Still curious about the theory behind this approach though.
Thanks,
-Frank
On Oct 5, 2:59 pm, palazzol <fpalaz...@xxxxxxxxx> wrote:
Hi,
This algorithm happens to be exactly what I needed, for a different
problem!
Can you post a reference to where this comes from, and/or how it
works?
FWIW - I also needed to know the "sense" of the reference frame, but I
did it symbolically, and got the answer:
Row3 cross Row2 = Row1.
Thank you!
On Oct 4, 10:36 am, Count Dracula <Levent.Ki...@xxxxxxxx> wrote:
On Oct 3, 10:37 am, ola.thean...@xxxxxxxxxxxx wrote:
To summarize, the problem boils down to finding a second vector that
is non-parallel to the normal, preferably orthogonal, without any
iteration or testing. Having such a vector there is a plethora of
methods that may be used to create an orthogonal basis.
Let the given normal vector b have components b1, b2, b3
b = (b1, b2, b3)
and let B denote the magnitude of b.
Here is an algorithm that finds two unit vectors perpendicular to
b and perpendicular to each other:
(1) Let v = (b1 + B, b2, b3) or v = (b1 - B, b2, b3) whichever makes
the first component bigger in absolute value.
(2) Form the three by three matrix H
H = I - 2 v v^T/(v^T v)
where I is the identity matrix and T denotes the transpose.
The first row of H is a unit vector parallel to b.
The other two rows are unit vectors perpendicular to b
and perpendicular to each other.
Explicitly, with V set equal to the square of the magnitude of v
V = v1^2 + v2^2 + v3^2
the first row of H is
[ 1 - 2 v1^2/V -2 v1 v2/V -2 v1 v3/V ]
The second row is
[ -2 v1 v2/V 1 - 2 v2^2 /V -2 v2 v3/V ]
and the third row
[ -2 v1 v3/V -2 v2 v3/V 1 - 2 v3^2/V ]
--
.
- Follow-Ups:
- Re: Stable finding of orthogonal vector to a normal in 3D?
- From: Count Dracula
- Re: Stable finding of orthogonal vector to a normal in 3D?
- References:
- Stable finding of orthogonal vector to a normal in 3D?
- From: ola . theander
- Re: Stable finding of orthogonal vector to a normal in 3D?
- From: Count Dracula
- Re: Stable finding of orthogonal vector to a normal in 3D?
- From: palazzol
- Stable finding of orthogonal vector to a normal in 3D?
- Prev by Date: Re: 1/(e^x-1)
- Next by Date: limit of quotient in 2 dimensions?
- Previous by thread: Re: Stable finding of orthogonal vector to a normal in 3D?
- Next by thread: Re: Stable finding of orthogonal vector to a normal in 3D?
- Index(es):
Relevant Pages
|