|
![](/i/fill.gif) |
Le 14/08/2012 04:30, Leroy a écrit :
> Hay,
>
> What is the easiest(fastest) way to calculate if a point is left or
> right from your position? Given just two vectors the one your at and the
> one you want to check. While using <0,0,0> & your position vector for
> the direction your 'looking at'.
>
> A
> /
> 0---at-
> \
> B
Is that 2D or 3D ?
V1: vector/point you are looking at from origin.
V2: vector/relative position of a point X from origin
in 3D:
You are missing at least another vector to define the "up".
If your vector V1 was not a direction you are looking at, but the
oriented normal of the splitting plane, you would have enough data (and
could use the solution of 2D). Vector N is the dot product of V1 and Up.
in 2D:
I assume you are at <0,0>, and you are looking at V1, left or right for
X is best computed as the sign of the cross product.
And yes, there is a plane in which left/right has no meaning, the
symmetry plane.
--
A good Manager will take you
through the forest, no mater what.
A Leader will take time to climb on a
Tree and say 'This is the wrong forest'.
Post a reply to this message
|
![](/i/fill.gif) |