Previous | Next --- Slide 48 of 136
Back to Lecture Thumbnails
Sneaky Turtle

It was mentioned in class that checking the inner products with the normals would work as long as the winding of the edges was consistent. In practice, is there a preference between winding clockwise and counterclockwise?

hal

I think either is probably ok as long as you know how you define normal and are consistent. If you go clockwise ( from P1 to P0 as the tangent vector), then your Normal points inwards. The "inside" of the triangle is then the region where the dot product of V and N is positive. But I'm new to CG so perhaps there's a convention all computer graphics people use.

jestinm

Interestingly, the default triangle winding used in OpenGL and WebGL rendering libraries (e.g. to determine whether a triangle is facing forwards or backwards) is counter-clockwise. This results in a triangle being front-facing (the normal vector points towards you) if the vertices wind counter-clockwise. This follows the right-hand rule used in mathematics and physics!

Please log in to leave a comment.