home *** CD-ROM | disk | FTP | other *** search
- Path: ccnserv.ccnmuc.net!usenet
- From: "Manfred.Linzner" <Manfred.Linzner@munich.netsurf.de>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: NormalVectors-How to compare angles?
- Date: Tue, 30 Jan 1996 17:33:48 -0800
- Organization: ccn computer consultant network GmbH
- Message-ID: <310EC6FC.40D6@munich.netsurf.de>
- References: <310CC190.78DF@gih.no>
- NNTP-Posting-Host: ns058.munich.netsurf.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-Mailer: Mozilla 2.0b5 (Win16; I)
-
- You don┤t have to calc the normals and! the angel between the normals and the lightsource. You
- can fake this by doing environment-shading. ENV-shading only needs the normals.
-
- try this:
-
- (0. You need a bitmap with a bright spot in the middle, i. e 128*128 pixel, 32 colors)
- 1. calc the normals
- 2. seek the smallest and the biggest value and generate a scale-faktor out of this
- (1=64 and 0=-64 with a 128*128 bitmap)
- 3. project your x,y,z cords from the normals to 2d
- 4. multiply this values with your scale-faktor
- 5. take this coords and texture map your triangle
-