Re: Stable finding of orthogonal vector to a normal in 3D?




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 ]

--


.



Relevant Pages

  • Re: How do you find two orthogonal vectors (a plane) perpendicular to given vector?
    ... whichever makes the first entry bigger in magnitude, ... 3-by-3 identity matrix. ... Then the first row of H will be a unit vector parallel to your b, ...
    (sci.math)
  • Re: Stable finding of orthogonal vector to a normal in 3D?
    ... and let B denote the magnitude of b. ... The first row of H is a unit vector parallel to b. ... The other two rows are unit vectors perpendicular to b ...
    (sci.math)
  • Re: RREFMOD
    ... Browsing through the group I discovered RREFMOD which promises to do ... In this case, multiply the first row by -5, multiply the third row by -5 and take mod 11. ... then you can get a matrix with first four columns to form an identity matrix. ...
    (comp.sys.hp48)
  • Re: RREFMOD
    ... Browsing through the group I discovered RREFMOD which promises to do ... In this case, multiply the first row by -5, multiply the third row by -5 and take mod 11. ... then you can get a matrix with first four columns to form an identity matrix. ...
    (comp.sys.hp48)
  • Re: Finding Normal Unit Vectors
    ... the derivative of a unit vector is always ... perpendicular to that unit vector. ... I tell Maple to evaluate these at t=-1 I get: ...
    (sci.math)

Quantcast