re surface normal orientations in article pscti aqe travis csd harris com srp travis csd harris com stephen pietrowicz writes how do you go about orienting all normals in the same direction given a set of points edges and faces look for edge inconsistencies consider two vertices p and q which are connected by at least one edge if p q is an edge then q p should not appear if both p q and q p appear as edges then the surface flips when you travel across that edge this is bad assuming warning warning warning that you have an otherwise acceptable surface you can pick an edge any edge and traverse the surface enforcing consistency with that edge pick an edge p q and mark it as ok for each face f containing this edge if more than oops make sure that all edges in f are consistent i e the face should be p q q r r s s t t p flip those which are wrong mark all of the edges in f as ok and add them to a queue check for duplicates and especially inconsistencies don t let the queue have both p q and q p remove an edge from the queue and go to if a marked edge is discovered to be inconsistent then you lose if step finds more than one face sharing a particular edge then you lose otherwise when done all of the edges will be consistent which means that all of the surface normals will either point in or out deciding which way is out is left as an exercise kenneth sloan computer and information sciences sloan cis uab edu university of alabama at birmingham a campbell hall uab station fax birmingham al
