  function mu = fEndX(t)
% Let RS be the right tangent point on the Sun as
% seen from Mars at time t. 
% Let LE be the left tangent point on Earth as 
% seen from Mars at time t.
% mu is the sine of angle RS-M-LE.

  E = Earth(t);
  M = Mars(t);
  S = [0;0];
  rSun = .695500;
  rEarth = .006374;
 
  [LS,RS] = TanPoints(M,S,rSun);
  [LE,RE] = TanPoints(M,E,rEarth);
  
  u = RS-M; u = u/norm(u);      % Mars-to-RS vector
  v = LE-M; v = v/norm(v);      % Mars-to-LE vector
  mu = u(1)*v(2) - u(2)*v(1);   % Cross-prod of u and v