My problem is simple, yet I haven't been able to solve it so far. Let's say I have a line l (defined by two 3 dimensional points p1 and p2) and a point p3. All points are on the same arbitrarily oriented plane. The line has its starting point at p1 and moves torwards p2. The plane normal is arbitrary but fixed. My question is now: How can I determine whether p3 is on the left or on the right side of the line? My only idea was to calculate a signed distance of p3 to the line:
Vector3D p1 = new Vector3D(4, 1, 0);
Vector3D p2 = new Vector3D(2, 2, 0);
Vector3D p3 = new Vector3D(4, 2, 0);
double n = (p1 - p2).Cross(p1 - p3).Length();
double d = (p3 - p2).Length();
double dis = n/d;
But this does not help me because the distance is always positive, regardless of the position of p3.