home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2373 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  27 lines

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