pub fn sphere_eclipse(
cosi: f64,
sini: f64,
r: &Vec3,
c: &Vec3,
rsphere: f64,
phi1: &mut f64,
phi2: &mut f64,
lam1: &mut f64,
lam2: &mut f64,
) -> boolExpand description
sphere_eclipse tells you whether or not a given sphere will eclipse a given point or not. If the answer is yes, it will also return with four parameters to define the phase range and the multiplier range delimiting the region within which the spheres surface is crossed. These can then be used as the starting point for later computation. (The line of sight is described as the point in question plus a scalar multiplier times a unit vector pointing towards Earth – this is the “multiplier” referred to above and below). The multiplier must be positive: in other words the routine does not project backwards. If the point in inside the sphere, phi1 will be set = 0, phi2 = 1, lam1 = 0, and lam2 = the largest value of the multiplier lambda
Arguments:
cosi: cosine of orbital inclinationsini: sine of orbital inclinationr: the position vector of the point in question (units of binary separation)c: the centre of the sphere enclosing the star (units of binary separation)rsphere: the radius defining the sphere enclosing the star (units of binary separation)phi1: if eclipse by the sphere, this is the start of the phase range (0 -1)phi2: if eclipse by the sphere, this is the end of the phase range (least amount > phi1)lam1: if eclipse by the sphere, this is the start of the multiplier range (>=0)lam2: if eclipse by the sphere, this is the end of the multiplier range (>lam1)
Returns:
- false = not eclipsed; true = eclipsed.