Skip to main content

sphere_eclipse_vector

Function sphere_eclipse_vector 

Source
pub fn sphere_eclipse_vector(
    earth: &Vec3,
    r: &Vec3,
    c: &Vec3,
    rsphere: f64,
    lam1: &mut f64,
    lam2: &mut f64,
) -> bool
Expand description

This version of sphere_eclipse tells you whether or not a given sphere will eclipse a given point at a particular phase or not. If the answer is yes, it will also return with the multiplier values giving the cut points. These can then be used as starting points for Roche lobe computations. These can then be used as the starting point for later computation. Points inside the sphere are regarded as being eclipsed with the lower mulitplier set = 0

Arguments:

  • earth: vector towards Earth
  • r: the position vector of the point in question (units of binary separation)
  • c: the centre of the sphere (units of binary separation)
  • rsphere: the radius defining the sphere enclosing the star (units of binary separation)
  • lam1: if eclipse by the sphere, this is the start of the multiplier range
  • lam2: if eclipse by the sphere, this is the end of the multiplier range

Returns:

  • false = not eclipsed; true = eclipsed.