67 |
|
bound(a,x,b) : if(a-x, a, if(x-b, b, x)); |
68 |
|
Acos(x) : acos(bound(-1,x,1)); |
69 |
|
Asin(x) : asin(bound(-1,x,1)); |
70 |
+ |
Atan2(y,x) : if(x*x+y*y, atan2(y,x), 0); |
71 |
|
Exp(x) : if(-x-100, 0, exp(x)); |
72 |
|
Sqrt(x) : if(x, sqrt(x), 0); |
73 |
|
|
145 |
|
|
146 |
|
{ Local (u,v) coordinates for planar surfaces } |
147 |
|
crosslen`private = Nx*Nx + Ny*Ny; |
148 |
< |
{ U is distance from origin in XY-plane } |
148 |
> |
{ U is distance from projected Z-axis } |
149 |
|
U = if( crosslen`private - FTINY, |
150 |
|
(Py*Nx - Px*Ny)/crosslen`private, |
151 |
|
Px); |