You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 2: Digital Drawing (46)
kenny-chi

Prof. Ng mentioned that the test of whether a point is inside or outside the triangle would be different if we were looking from the perspective of point P1 to P0. Would this also change depending on the direction of our normal vector?

CarneAsadaFry

Responding to @kenny-chi, the test would indeed give opposite results if N was facing in the opposite direction. To see this, V as drawn would make an acute angle with -N, and so the dot product would be positive. Of course, if you have a consistent definition for the normal vector, this is just another piece of bookkeeping to track.

Staffrishiu

@kenny-chi, @CarneAsadaFry you're both spot on! The formula we use for NN (slide 41) depends on two points PP and P0P_0, so which point is which affects the normal we get and the sign of our result. The key to making sure our point-in-triangle tests still work is going through our triangle points in the same order: If we go P0P_0 -> P1P_1, the next one should be P1P_1 -> P2P_2, then P2P_2 -> P0P_0 rather than a different order.

You must be enrolled in the course to comment