home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / NEWS / RADIANCE / LIB / CYL.CAL < prev    next >
Text File  |  1993-10-07  |  357b  |  18 lines

  1. {
  2.     cyl.cal - 2d coordinate mapping onto cylinder.
  3.  
  4.     Unit radius cylinder with axis along z.
  5.  
  6.     A1 = picture height/width
  7.     A2 = unit scale for pattern
  8. }
  9.  
  10. cyl_u = atan2(Py,Px)/A2;
  11. cyl_v = Pz/A2;
  12.  
  13. cyl_tile_u = mod(cyl_u,max(1,1/A1));
  14. cyl_tile_v = mod(cyl_v,max(1,A1));
  15.  
  16. cyl_match_u = tri(cyl_u,max(1,1/A1));
  17. cyl_match_v = tri(cyl_v,max(1,A1));
  18.