Revision: | 2.9 |

Committed: | Sat Feb 22 02:07:23 2003 UTC (21 years, 2 months ago) by greg |

Branch: | MAIN |

CVS Tags: | rad3R7P2, rad3R7P1, rad3R5, rad3R6, rad3R6P1, rad3R8 |

Changes since 2.8: |
+3 -4 lines |

Log Message: | Changes and check-in for 3.5 release Includes new source files and modifications not recorded for many years See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release |

# | Content |
---|---|

1 | { RCSid: $Id$ } |

2 | { |

3 | Source distribution coordinates (degrees). |

4 | |

5 | Theta is measured from the negative z-axis. |

6 | Phi is measured from the positive x-axis (0 degrees) |

7 | towards the negative y-axis (90 degrees). |

8 | |

9 | srcB_vert and srcB_horiz are angles |

10 | used in type B photometry. |

11 | |

12 | boxcorr function corrects for distribution modeled |

13 | with a rectangular box. lboxcorr provides a more |

14 | accurate calculation for nearby surfaces, but requires |

15 | that the source box be centered at the origin. |

16 | The dimensions of the box, which must be aligned with |

17 | the x,y,z axes, are given in meters regardless of the |

18 | units being used in the scene file. |

19 | |

20 | cylcorr function provides the same correction for a |

21 | cylinder whose central axis is aligned with the Z-axis. |

22 | |

23 | A1 - optional multipier |

24 | A2,A3,A4 - X,Y,Z dimensions of axis-aligned box (in meters!) |

25 | or |

26 | A2,A3 - diameter and height of Z-aligned cylinder (meters) |

27 | } |

28 | { local definitions } |

29 | boxprojection = abs(Dx)*A3*A4 + abs(Dy)*A2*A4 + abs(Dz)*A2*A3; |

30 | lboxprojection = ( noneg(abs(Px-Dx*Ts)-A2/2)*A3*A4 + |

31 | noneg(abs(Py-Dy*Ts)-A3/2)*A2*A4 + |

32 | noneg(abs(Pz-Dz*Ts)-A4/2)*A2*A3 ) / Ts; |

33 | cylprojection = A2*A3*sqrt(1-Dz*Dz) + PI/4*A2*A2*abs(Dz); |

34 | |

35 | flatcorr(v) = corr(v) / Rdot; { correction for flat sources } |

36 | corr(v) = if(AC-.5, A1*v, v); { multiplier correction } |

37 | boxcorr(v) = A1 * v / boxprojection; { correction for emitting box } |

38 | lboxcorr(v) = A1 * v / lboxprojection; { local box correction } |

39 | cylcorr(v) = A1 * v / cylprojection; { cylinder correction } |

40 | |

41 | src_theta = Acos(Dz) / DEGREE; { 0-180 } |

42 | src_phi = mod( Atan2(Dy, -Dx) / DEGREE, 360 ); { 0-360 } |

43 | { bilateral symmetry } |

44 | src_phi2 = tri( src_phi, 180 ); { 0-180 } |

45 | { quadrilateral symmetry } |

46 | src_phi4 = tri( src_phi, 90 ); { 0-90 } |

47 | |

48 | { Type B photometry coordinates } |

49 | srcB_vert = atan2( -Dx, Dz ) / DEGREE; |

50 | srcB_horiz = atan2( Dy, Dz ) / DEGREE; |

51 | { w/ symmetry } |

52 | srcB_vert2 = abs( srcB_vert ); |

53 | srcB_horiz2 = abs( srcB_horiz ); |