## functions in rays.i - i

internal_rays

internal_rays(rays) returns 6-element (cos,sin,y,z,x,r) representation of RAYS. The first dimension of RAYS may be length 3, 5, or 6 to represent the ray(s) in TDG/DIRT coordinates (x,y,theta), "best" coordinates (x,y,z,theta,phi), or internal coordinates (cos,sin,y,z,x,r), respectively. The first dimension of the result always has length 6. The internal coordinates are what Drat uses internally to describe the ray. The coordinate system is rotated about the z-axis until the ray lies in a plane of constant y (there are at least two ways to do this). The point (x,y,z) can be any point on the ray, and r=sqrt(x^2+y^2) is the corresponding cylindrical radius. The clockwise angle theta from the +z-axis to the ray direction (which always lies in the zx-plane) determines cos=cos(theta) and sin=sin(theta). As a specification of a ray, this system is triply redundant because the point (x,y,z) could be any point on the ray, both the sine and cosine of theta appear, and r=sqrt(x^2+y^2). However, the slimits parameter -- used to specify the points along a ray where the transport integration starts and stops -- is measured from the point (x,y,z) specified as a part of the (cos,sin,y,z,x,r) ray coordinate. Thus, any change in the point (x,y,z) on a ray must be accompanied by a corresponding change in the slimits for that ray. Interpreted function, defined at i/rays.i line 155SEE ALSO: form_rays, best_rays, dirt_rays, get_s0, picture_rays