Revision: | 1.1 |
Committed: | Wed Mar 12 17:45:47 2003 UTC (22 years, 2 months ago) by greg |
Branch: | MAIN |
Log Message: | Added the rest of the missing files to ray/lib/ |
# | Content |
---|---|
1 | { |
2 | ball.cal - 2d coordinate mapping onto sphere. |
3 | |
4 | unit sphere centered at origin |
5 | |
6 | A1 = picture height/width |
7 | A2 = unit scale for pattern |
8 | } |
9 | |
10 | ball_u = Atan2(Py,Px)*Sqrt(1-Pz*Pz)/A2; |
11 | ball_v = Acos(Pz)/A2; |
12 | |
13 | ball_tile_u = mod(ball_u,max(1,1/A1)); |
14 | ball_tile_v = mod(ball_v,max(1,A1)); |
15 | |
16 | ball_match_u = tri(ball_u,max(1,1/A1)); |
17 | ball_match_v = tri(ball_v,max(1,A1)); |