#### Archived

This topic is now archived and is closed to further replies.

# 3D point left or right of vector ?

This topic is 5899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi again, Is there some code that will tell me if a 3d point is on the left or right of a vector, where both the point and vector are on the same plane ? For instance, I have a polygon and I split this with a vector. I need to calculate which verts of the polygon are on the left of the vector and which are on the right. Scorpio

##### Share on other sites
Left or right depends on what side you''re looking at it.

##### Share on other sites
Ok i can see that, sorry for not being clear.

I''d like to know if a 3d point is on the left or right of a vector, where the point and vector are on the same plane and i''m viewing the plane from the direction of the normal to the plane.

Can this be done ?

##### Share on other sites
I didn''t really understand exactly where you''re looking at it, but this is a solution: take the point, cross it with the vector, and compare it to the normal. If it has the same sign, then it''s on one side. If it''s negative, then it''s on the other side.

##### Share on other sites
I didn''t really understand exactly where you''re looking at it, but this is a solution: take the point, cross it with the vector, and compare it to the normal. If it has the same sign, then it''s on one side. If it''s negative, then it''s on the other side.

##### Share on other sites
Thanks very much, i''ll give it a go

##### Share on other sites
quote:
Original post by yellowjon
I didn''t really understand exactly where you''re looking at it, but this is a solution: take the point, cross it with the vector, and compare it to the normal. If it has the same sign, then it''s on one side. If it''s negative, then it''s on the other side.

Hmmm... Don''t cross the point and the vector of the line. If O is a point on the line, v is the line''s direction, P is the point that should be tested, and n is the normal of the plane, then the "determinant" is:

d = (P - O) X v . n

if(d<0) it''s on one side, else it''s on the other side

Cédric

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633679
• Total Posts
3013300
×