Revision: | 1.2 |
Committed: | Tue Mar 18 17:30:16 2003 UTC (22 years, 1 month 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 | 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)); |