Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!ucsd!nosc!crash!jcs From: jcs@crash.cts.com (John Schultz) Newsgroups: comp.graphics Subject: Re: clockwise in 3D explained Summary: What are you trying to do? Message-ID: <5323@crash.cts.com> Date: 28 Oct 90 19:30:44 GMT References: <42882@eerie.acsu.Buffalo.EDU> Organization: Crash TimeSharing, El Cajon, CA Lines: 20 In article <42882@eerie.acsu.Buffalo.EDU> v134kkut@ubvmsa.cc.buffalo.edu writes: >So far everyone has ridiculed the idea of 'clockwise' in 3D space. It does >exist, it was originally what I was looking for. What the good folks were >referring to was 'is the clockwise side of the polygon facing towards or away >from the center of the 3D object?' > >take for example a sphere; 'are the faces clockwise in 3D space?' means 'are >they facing the inside or outside?' Are you trying to do backface culling? If so, then just precompute normals for all of your polygons (or define all polygons as counter- clockwise and compute the normal when you need it (cross product)). Then take a vector from the polygon to the viewpoint and dot that vector with the normal vector. Angles less than zero point away, greater than zero point towards (visible), and equal to zero are edge on. John