Path: chuka.playstation.co.uk!news From: SCEE TECH Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: TMD Normals Date: Mon, 23 Jun 1997 18:43:52 +0100 Organization: Sony Computer Entertainment Europe Lines: 30 Message-ID: <33AEB5D8.69A1@interactive.sony.com> References: <01bc7ff3$c98442c0$LocalHost@default> Reply-To: N/A-Use-Newsgroups NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Jon Prestidge (alias Moose) wrote: > > Can someone explain how normals are defined for the simple TMD primitives > F_3 and F_4? I understand the concept of normals OK, but what > measurements are used e.g.: > ....is the normal defined as an imaginary x,y,z point that the normal > line is projected to from the centre of the polygon's surface? > ...or is it an angle that one of the vertices of the polygon is rotated > by, to form a normal line? If so, which vertex does it relate to? > ....or other?? > > ... please also include typical values so that I'll know if I'm thinking > along the same lines. > > Cheers in advance if anyone can help, > > Jon The normal is the cross, or outer, product of 2 vectors in the plane of the polygon. Cross product is: c.vx = v1.vy * v2.vz - v1.vz * v2.vx c.vy = v1.vz * v2.vx - v1.vx * v2.vz c.vz = v1.vx * v2.vy - v1.vy * v2.vx Just take 3 of the vertices in your polygon (v0,v1,v2) calculate v0 - v1, v2 - v0 and slam it in the cross product, and thats your normal. It may be worth you getting a 3d graphics book. Stuart