Retrogradation (of Mercury)
In the graphics below, this page shows a simplified demonstration of the optical effect called the “retrograding” of planets, for the specific case of Mercury.
Retrogradation is not an optical illusion, but a real effect, due to the relative positions of the Earth and Mercury, and the fact that both move around the Sun.
The same effect is observed for the outer planets too (just think of being on Mercury, observing the Earth).
In this simulation, the “universe” is composed of the Sun (in the centre), the planets Mercury (red, on the inner circle) and Earth (blue, on the intermediate circle), and the “far stars” (a set of dotted circles on the outside). The “far stars” are the backdrop against which the retrogradation is seen by a person observing from the Earth.
At the start of the simulation, the Earth is at the right, Mercury is between the Sun and the Earth, and therefore would not really be observable from Earth because of the blazing light of the Sun. If it could be, it would look like a little dot against the backdrop of the far stars, and that view is represented by the red dot with white outline that sits near the stars, at the left.
Suggestion of use
Click the Sun to start the simulation. Just observe the motion of the image of Mercury against the “far stars” without looking at the Earth or Mercury.
Because Mercury is closer to the Sun than the Earth, it has to move faster to prevent it falling into the Sun: Mercury takes only 88 days for an orbit, compared to Earth’s 365. It is going 4.15 times faster.
Operation
Click the Sun to pause or resume the simulation.
Click the Sun holding the option (alt) key to ”reset” the Universe.
Click the Earth to show/hide the line of sight from the observer to the “far stars” (if you have trouble clicking the Earth when the simulation runs, pause it first by clicking the Sun).
In this simulation, the line of sight always starts from the centre of the Earth and goes through the centre of Mercury and ends at the observed image, near the ”far stars”.
For those interested in how the simulation is done, an explanation of the calculations is given below the simulation. The graphics are entirely done with SVG (Scaleable Vector Graphics) and CSS (Cascading Style Sheets) plus a little JavaScript to animate them.
Mathematics
Here is how the positions of the SVG elements are computed and how they are moved around.
We use the conventional orthogonal cartesian xy coordinate system as used in mathematics, with the Sun as the origin, and the terms “vertical” and “horizontal” in the usual sense of “aligned with the y axis” and “aligned with the x axis”.
However, SVG uses the silly 2D computer graphics system in which the origin is at the top left, the y axis points down and the angles are measured clockwise.
We do the calculations in the usual maths system, and then just before display of the elements, their coordinates are converted to the graphics system by
xgraphics = x0+x
ygraphics = y0−y
where x0,y0 are the graphic coordinates of the Sun’s centre.
Movement of the planets
Let t be time. Time starts at 0 and increases regularly, in small steps. If the steps are small enough, the simulation looks smooth.
The position of a planet that moves smoothly along a circular path of radius r is:
where s is a factor indicating speed. In our case we only have to ensure that the speed of Mercury is 365/88 times that of the Earth, but we will choose the time step small enough so it is all pleasing to the eye.
The line of Sight
The line of sight from the Earth E through Mercury M all the way to the far stars at Q can be computed from the positions of Earth and Mercury at each point in time.
The line going through the two points E and M has equation:
working this out:
with:
with a being the ”slope”, that becomes the familiar
But where does it hit the “far stars” circle? If that circle has radius R, it is defined by
Substituting the first into the second equation, we get a quadratic equation in x:
which, worked out, becomes
to facilitate writing the code we introduce three more intermediary quantities A, B anc C:
which gives the familiar quadratic equation:
for which the two solutions are:
Despite all these mathematical manipulations, the JavaScript code is remarkably simple:
let a=(YE-YM)/(XE-XM); // the slope
let b=YM-a*XM;
let A=(1+a*a); let B=2*a*b; let C=b*b-R*R;
let X1 = (-B + Math.sqrt(B*B-4*A*C))/(2*A);
let X2 = (-B - Math.sqrt(B*B-4*A*C))/(2*A);
However… It is not over, because we need to decide which of these two solutions to choose. If the Earth is to the right of Mercury (as in the drawing above) then the image is on the left and we must choose the negative solution, otherwise we must choose the positive one:
if (XE>XM) { /* Earth at right, take negative */
(X1<0) ? XQ=X1 : XQ=X2 ;
}
else { /* right */
(X1>=0) ? XQ=X1 : XQ=X2 ;
};
YQ = a*XQ+b;
And that gives us the position of Mercury's image against the backdrop of the “far stars”.
But it still is not all! The slope of the line EA becomes infinite when the planets are on a vertical line. Therefore we should use the equation y=F(x) to calculate y from x when the slope is not too great, and use x=F(y) when the slope is large. This is easily decided by comparing the distance between the planets along the x axis and along the y axis.
The full code is then:
H = Math.abs(XE-XM); V = Math.abs(YE-YM);
if (H>V) { // Mercury is left or right of Earth; XE-XM is reasonably large but YE-YM may go through zero; use y=F(x)
let a=(YE-YM)/(XE-XM); // the slope
let b=YM-a*XM;
let A=(1+a*a); let B=2*a*b; let C=b*b-R*R;
let X1 = (-B + Math.sqrt(B*B-4*A*C))/(2*A);
let X2 = (-B - Math.sqrt(B*B-4*A*C))/(2*A);
if (XE>XM) { /* Earth at right, take negative */
(X1<0) ? XQ=X1 : XQ=X2 ;
}
else { /* right */
(X1>=0) ? XQ=X1 : XQ=X2 ;
};
YQ = a*XQ+b;
}
else { // Mercury is above or below Earth; YM-YE is reasonably large but XM-XE may go through zero; compute x from y
let a=(XE-XM)/(YE-YM); // the slope
let b=XM-a*YM;
let A=(1+a*a); let B=2*a*b; let C=b*b-R*R;
let Y1 = (-B + Math.sqrt(B*B-4*A*C))/(2*A);
let Y2 = (-B - Math.sqrt(B*B-4*A*C))/(2*A);
if (YE>YM) { /* Earth at top, take negative */
(Y1<0) ? YQ=Y1 : YQ=Y2 ;
}
else { /* right */
(Y1>=0) ? YQ=Y1 : YQ=Y2 ;
};
XQ = a*YQ+b;
};
MercuryImage.setAttribute("cx",XQ+X0); MercuryImage.setAttribute("cy",Y0-YQ);
LineOfSight.setAttribute("d","M"+(XQ+X0)+","+(Y0-YQ)+" L"+(XE+X0)+","+(Y0-YE) );
This is computed for each time step.