| Revision: | 1.2 |
| Committed: | Tue Mar 18 17:30:17 2003 UTC (22 years, 7 months ago) by greg |
| Branch: | MAIN |
| CVS Tags: | HEAD |
| Changes since 1.1: | +0 -0 lines |
| State: | FILE REMOVED |
| Log Message: | Decided to move ray/lib directory into non-CVS distribution |
| # | Content |
|---|---|
| 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)+PI)/A2; |
| 11 | cyl_v = Pz/A2; |
| 12 | |
| 13 | cyl_tile_u = mod(cyl_u,pic_width); |
| 14 | cyl_tile_v = mod(cyl_v,pic_height); |
| 15 | |
| 16 | cyl_match_u = tri(cyl_u,pic_width); |
| 17 | cyl_match_v = tri(cyl_v,pic_height); |
| 18 | |
| 19 | pic_width = max(1,1/A1); |
| 20 | pic_height = max(1,A1); |