POV-Ray : Newsgroups : povray.advanced-users : Left & Right ? : Re: Left & Right ? Server Time
26 Jun 2024 09:11:14 EDT (-0400)
  Re: Left & Right ?  
From: Leroy
Date: 14 Aug 2012 12:12:55
Message: <502a7907@news.povray.org>
Le_Forgeron wrote:
> 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 ?
Yes :)
I got into the habit of working out problems like this in 2d the 
expanding the solution to 3D. For most things 2D acts like a plane in 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".
  Your Right! Another habit of using Y as 'up' everywhere.
>  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.
> 
  Lets see, I have played around with normals and planes. Its a point 
perpendicular to a plane at <0,0,0>,it defines a plane in POV. I have no 
idea what the 'splitting plane' is!  I think you mean the plane dividing 
left and right. The dot product of (V1,Up) is a float!? I don't 
understand 'Vector N'.

> 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.
This probably is the answer I was thinking of when I asked the question!
> 
> And yes, there is a plane in which left/right has no meaning, the
> symmetry plane.
Symmetry Plane!? I'll have to google that.

Thank for your help.
Have Fun!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.