Wednesday 24 April 2019

Wolfram Mathworld great circle equation error

On rereading the Wolfram article, their equation (9) is ##\phi=\delta=\pi / 2 - v##, so ##v## is the colatidude. I can only forgive myself because they earlier say ##\delta=90°-\phi##. It would be helpful if they wrote "where ##a## is the radius of the sphere, ##c_1,c_2## are constants of integration, ##u,v## are respectively longitude and colatitude" under their equation (19).

According to (19) the geodesic equation on a sphere (great circle) is given below. It is derived from a somewhat specialised equation for a geodesic on a surface ( (30)), which itself is derived by considering a minimised line integral. Wolfram's (19) is given as
a{\mathrm{cos} u\ }{\mathrm{s}\mathrm{i}\mathrm{n} v\ }{\mathrm{sin} c_2\ }+a{\mathrm{sin} u\ }{\mathrm{s}\mathrm{i}\mathrm{n} v\ }{\mathrm{cos} c_2\ }-\frac{a{\mathrm{c}\mathrm{o}\mathrm{s} v\ }}{\sqrt{{\left(\frac{a}{c_1}\right)}^2-1}}=0 & \phantom {10000}(1) \\
\end{align}where ##a## is the radius of the sphere, ##c_1,c_2## are constants of integration, ##u,v## are respectively longitude and latitude. In the next equation it recasts that in Cartesian coordinates as\begin{align}
x{\mathrm{sin} c_2\ }+y{\mathrm{cos} c_2\ }-\frac{z}{\sqrt{{\left(\frac{a}{c_1}\right)}^2-1}}=0 & \phantom {10000}(2) \\
\end{align}"which shows that the geodesic giving the shortest path between two points on the surface of the equation lies on a plane that passes through the two points in question and also through center of the sphere." (2) is indeed the equation of a plane which contains the origin, but it also implies that\begin{align}
x=a{\mathrm{cos} u\ }{\mathrm{s}\mathrm{i}\mathrm{n} v\ }\ \ ,\ y=a{\mathrm{sin} u\ }{\mathrm{s}\mathrm{i}\mathrm{n} v\ }\ \ ,\ z=\ a{\mathrm{c}\mathrm{o}\mathrm{s} v\ } & \phantom {10000}(3) \\
\end{align}This is very wrong. It would be correct if ##v## was the colatitude (angle measured from the pole). The colatitude is normally called  ##\phi ## and  ##\phi ={\pi }/{2}-v##, as they say in their #7. Alternatively one can swap all ##{\mathrm{sin} v\ },{\mathrm{cos} v\ }##. I guessed that the equation is therefore\begin{align}
a{\mathrm{cos} u\ }{\mathrm{cos} v\ }{\mathrm{sin} c_2\ }+a{\mathrm{sin} u\ }{\mathrm{cos} v\ }{\mathrm{cos} c_2\ }-\frac{a{\mathrm{sin} v\ }}{\sqrt{{\left(\frac{a}{c_1}\right)}^2-1}}=0 & \phantom {10000}(4) \\
\end{align}This is correct as I have proved by other means. (Here). Numerically it can be shown with my great 3-D graph plotter (here and here). The incorrect equation is obviously not a great circle, whereas the correct one looks plausible;

The schematic shows great circles between cities. The right hand one shows the London-Peking great circle according Wolfram Mathworld. Perhaps this is what happened to the British Airways pilot who flew from London to Edinburgh instead of Düsseldorf in a month ago. (On the BBC here)

I have not been able to trace the source of the error in the Wolfram Mathworld proof. It may go as far back as their (7) where they might have intended to introduce ##\phi ##.

This error on Wolfram Mathworld caused me a lot of grief!

And another small error

There is also a typo on between equations (11) and (12). It reads "Starting with equation (##\mathrm{\Diamond }##)" which should be "Starting with equation (5)"

Sunday 21 April 2019

3-D Graph plotter Version 2

Paul showed me how to write VBA for an Excel spreadsheet. David had also urged me to look at the Timer function in VBA to speed up production of animations on the 3-D Graph plotter. I dedicate this post to Paul and David.

Inspired by both of them I have put an animation feature in the 3-D graph plotter and here are the results.  All the movies had to be adjusted in html to make them bigger. The old method of screenshots into a .gif file is shown. It has some merits. I used the MS-Windows screen recorder to produce the .mp4 file. It is very clunky. It would be nice to be able to delineate the area of the screen one wished to record more precisely.

The geodesic plotter, I am still working on the equations :-(
On youtube here which is bigger 
Original mp4 here which is bigger and clearer.
Excel file here.

The same sphere produced painstakingly from 36 screenshots each 10° apart.

The cube from an .mp4 file loaded directly onto Blogger. Excel file here.

The cube from the.mp4 file first uploaded to Youtube. On Youtube here.
A similar cube produced painstakingly from 44 screenshots.