Drawing ellipses on a sphere #5318
Replies: 3 comments 1 reply
-
Other googling avenues finds sites like this and when coding that up in branch better-sphere-ellipse2 and running the same plot I get this: Here, the minor axis is much larger than what I prescribed. Again, for more modest major,minor combinations this result converges well on the other two. This algorithm uses the definition of the ellipse that the sum of the distances from the two focal points to the ellipse perimeter shall be a constant 2a, where a is the semi-major axis. So, if I let the major axis increase from 170 to 180 the focal points are at latitude 12.0577136594 (sqrt(180^180 - 90^90)), with longitudes 180 apart. Turns out the sum of distances from any point on Equator to these two points equal 180 degrees, meaning it does not matter what minor axis I specify, I get a full Equatorial circle for that case. That seems a bit odd to me as well. Maybe @WalterHFSmith can cut through the fog on these postings. |
Beta Was this translation helpful? Give feedback.
-
Perhaps @WalterHFSmith is enjoying his summer vacation? Hard to imagine Walter not having an opinion on this! |
Beta Was this translation helpful? Give feedback.
-
Doing a Bigham distribution on a sphere is not going to happen, and I agree perhaps equidistant would have been better. As you say, for these large dimensions it will break down anyway, and for more modest sizes they all converge well. So perhaps what we do is not so bad as it still looks like an ellipse even if very large. I will test with equidistant but suspect I have no good way of measuring "better". |
Beta Was this translation helpful? Give feedback.
-
In fixing various issues in project -Z related to ellipses I started to read more about how to draw ellipses on a spherical surface. What does it mean if we want to plot an ellipse at some point with a given azimuth and two semi-axes? Normally, ellipses are drawn on flat surfaces. How does that translate to a sphere (never mind an ellipsoid)? GMT plots ellipses, and it does it using this scheme in the gmt_get_geo_ellipse function:
Some googling lead me to this page which I first coded up quickly in Matlab, then implemented in gmt_get_geo_ellipse in the branch better-sphere-ellipse. Basically, they assert that the surface ellipse shall be the intersection of a conical elliptical surface and the sphere. The equations thus gives the Cartesian (x,y,z) of that intersection.
A handful of GMT tests that draw ellipses fail with the different algorithm; these are just tiny differences and I expected that the map projection solution is just slightly more approximate than the real thing. However, if we push this to the extreme and plot an ellipse that has a major axis of almost 180 degrees (here 170 x 90 degrees) it is starting to look quite different.
First, here is GMT 6.2.0 rendition of this ellipse:
Next is the cone/sphere intersection in the branch:
If I push more towards 180 then it starts to look more and more like an "eye", and it becomes slower - not sure why yet. I guess I am accustomed to what we always have had, but I confess I do not really know what is the correct answer here for such large elliptical areas on a sphere. What we have is clearly a Cartesian flat-Earth approximation of sorts, while the new solution appears to be an exact intersection - if that is what we want.
Open to comments on this from the whole @GenericMappingTools/pygmt-admin.
Beta Was this translation helpful? Give feedback.
All reactions