The goal is working in EPSG 3785 and in particular Google Maps, one wishes to render (on a tile) a circle of a given radius in meters. The rendering is done in pixels.
I would guess that one could take a very simple linear approach to identify the meters per pixel for a given tile zoom:
metersPerPixel = MercWorldWidthMeters / (2 ^ zoom) / tileSize
Now, considering you wish to draw a radius of let's say 100 meters around a point in pixels, then you convert to pixels:
pixelRadius = metersRadius / metersPerPixel
This should in my mind produce a circle of metersRadius on the tile.
However, actually measuring the produced circle's radius with a circle produced in WGS 84 and Great Circle logic, it shows that it is actually about 40% smaller than expected... a big difference.
Does the logic above have a flaw?
Note that I am not interested in finding an alternative algorithm (going to Great Circle calculations and the like)... my question here is "why are the results (so much) different than expected".
All conversions this far have been working fine with the above logic but once I decided to calculate actual distance on EPSG 3785 I seem to be hitting a break wall.
To give an example with figures:
Radius: 0.08 miles ( = 128.74752 meters ) MercWorldWidthMeters: 20037508.342789 * 2 Zoom: 16 TileSize: 256
Above logic suggests a circle of ~107 pixels diameter.
Great Circle suggests a circle of ~175 pixels diameter.