home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / tt / raysh402 / guide.tex / node36_mn.html < prev    next >
Text File  |  1992-02-09  |  5KB  |  77 lines

  1.  
  2. <H1><A ID="SECTION00930000000000000000">
  3. Mapping Functions</A>
  4. </H1>
  5.  
  6. <P>
  7. Mapping functions are used to apply two-dimensional textures to
  8. surfaces.  Each mapping functions defines a different method of transforming
  9. a three dimensional point of intersection to a two dimensional <I>u</I> - <I>v</I> pair
  10. termed texturing coordinates.
  11. Typically, the arguments to a mapping method define a center of
  12. a projection and two non-parallel axes that define a local coordinate system.
  13.  
  14. <P>
  15. The default mapping method is termed <I>u</I> - <I>v</I> mapping or <#787#><EM>inverse mapping</EM><#787#>.
  16. Normally, there is a different inverse mapping method for each primitive type
  17. (see chapter 5).
  18. When inverse mapping is used, the point of intersection is passed to
  19. the <I>uv</I> method for the primitive that was hit.
  20.  
  21. <P>
  22. <DL>
  23. <DT><STRONG><#5030#><#5030#></STRONG></DT>
  24. <DD><#1541#><TT>map</TT><#1541#> <#1542#><TT>uv</TT><#1542#> 
  25. <BR>    Use the <I>uv</I> (inverse mapping) method associated with the
  26.     object that was intersected in order to map from 3D to determine
  27.     texturing coordinates.
  28. </DD>
  29. </DL>The inverse mapping method for each primitive is described in Chapter 5.
  30.  
  31. <P>
  32. <DL>
  33. <DT><STRONG><#5032#><#5032#></STRONG></DT>
  34. <DD><#1545#><TT>map</TT><#1545#> <#1546#><TT>planar</TT><#1546#> [<tex2html_verbatim_mark>#math151#<tex2html_image_mark>#tex2html_wrap_inline5034#⇧ <tex2html_verbatim_mark>#math152#<tex2html_image_mark>#tex2html_wrap_inline5036#⇧ <tex2html_verbatim_mark>#math153#<tex2html_image_mark>#tex2html_wrap_inline5038#⇧] 
  35. <BR>    Use a planar mapping method. The 2D texture is transformed
  36.     so that its <I>u</I> axis is given by <tex2html_verbatim_mark>#math154#<tex2html_image_mark>#tex2html_wrap_inline5041#⇧ and its <I>v</I>
  37.     axis by <I>vaxis</I>.  The texture is projected along the vector
  38.     defined by the cross product of the <I>u</I> and <I>v</I> axes, with
  39.     the (0,0) in texture space mapped to <tex2html_verbatim_mark>#math155#<tex2html_image_mark>#tex2html_wrap_inline5047#⇧.
  40. </DD>
  41. </DL>
  42. <P>
  43. <DL>
  44. <DT><STRONG><#5048#><#5048#></STRONG></DT>
  45. <DD><#1552#><TT>map</TT><#1552#> <#1553#><TT>cylindrical</TT><#1553#> [<tex2html_verbatim_mark>#math156#<tex2html_image_mark>#tex2html_wrap_inline5050#⇧ <tex2html_verbatim_mark>#math157#<tex2html_image_mark>#tex2html_wrap_inline5052#⇧ <tex2html_verbatim_mark>#math158#<tex2html_image_mark>#tex2html_wrap_inline5054#⇧] 
  46. <BR>    Use a cylindrical mapping method.  The point of intersection
  47.     is projected onto an imaginary cylinder, and the location
  48.     of the projected point is used to determine the texture coordinates.
  49.     If given, <tex2html_verbatim_mark>#math159#<tex2html_image_mark>#tex2html_wrap_inline5056#⇧ and
  50.     <tex2html_verbatim_mark>#math160#<tex2html_image_mark>#tex2html_wrap_inline5058#⇧ define the cylinder's axis, and <tex2html_verbatim_mark>#math161#<tex2html_image_mark>#tex2html_wrap_inline5060#⇧ defines
  51.     where <I>u</I> = 0 is located.
  52. </DD>
  53. </DL>See the description of the inverse mapping method for the 
  54. cylinder in Chapter 5.  By default, the point of intersection is
  55. projected onto a cylinder that runs through the origin along the <I>z</I>
  56. axis, with <tex2html_verbatim_mark>#math162#<tex2html_image_mark>#tex2html_wrap_inline5064#⇧ equal to the <I>x</I> axis.
  57.  
  58. <P>
  59. <DL>
  60. <DT><STRONG><#5066#><#5066#></STRONG></DT>
  61. <DD><#1559#><TT>map</TT><#1559#> <#1560#><TT>spherical</TT><#1560#> [<tex2html_verbatim_mark>#math163#<tex2html_image_mark>#tex2html_wrap_inline5068#⇧ <tex2html_verbatim_mark>#math164#<tex2html_image_mark>#tex2html_wrap_inline5070#⇧ <tex2html_verbatim_mark>#math165#<tex2html_image_mark>#tex2html_wrap_inline5072#⇧] 
  62. <BR>    Use a spherical mapping method.  The intersection point is
  63.     projected onto an imaginary sphere, and the location of the
  64.     projected point     is used to determine the texturing coordinates
  65.     in a manner identical to that used in the inverse mapping method
  66.     for the sphere primitive.
  67.     If given, the center of
  68.     the projection is <tex2html_verbatim_mark>#math166#<tex2html_image_mark>#tex2html_wrap_inline5074#⇧, <tex2html_verbatim_mark>#math167#<tex2html_image_mark>#tex2html_wrap_inline5076#⇧ defines
  69.     the sphere axis, and the point where the
  70.     non-parallel <tex2html_verbatim_mark>#math168#<tex2html_image_mark>#tex2html_wrap_inline5078#⇧ intersects the sphere
  71.     defines where <I>u</I> = 0 is located.
  72. </DD>
  73. </DL>By default, a spherical mapping projects points towards the origin,
  74. with <tex2html_verbatim_mark>#math169#<tex2html_image_mark>#tex2html_wrap_inline5081#⇧ defined to be the <I>z</I> axis and
  75. <tex2html_verbatim_mark>#math170#<tex2html_image_mark>#tex2html_wrap_inline5084#⇧ defined to be the <I>x</I> axis.
  76.  
  77.