MapControl Field of View non linear

62 views Asked by At

I'm using the MapControl on a UWP project, to simulate a virtual camera on the surface. Around the MapControl I have a set of indicators, like a ruler, showing the heading (azimuth) and the pitch (elevation).

Here's a capture.

enter image description here

But I've realized that there's a distortion or a stretching of the image to the edges of the MapControl. My indicator are only exact when on the center and on the edges (both horizontally and vertically). when more far from these points, it's bigger the offset.

Here are more pictures showing the distortion (very noticeable on the Sun and Moon spheres):

Almost no distortion, only mild vertical distortion Same Field of View. Only changed the heading and the pitch of the scene. Visible distortion, both vertically and horizontally

I can't change the distortion because it's MapControl rendering engine's work, but can I know how it's distorted both vertically and horizontally? It's known the formula the percentile offset that I have to add to the indicators?

Thank you

1

There are 1 answers

1
Duncan Lawler On BEST ANSWER

What you're describing is expected. The map control uses a standard 3D projection matrix to take the 3D world scene and project it into 2D coordinates on your screen. This produces a non-linear scaling across the screen. See this post for example Projection Matrix The same is true for any actual camera lens for physical cameras. Depending on the field of view you will get distortion towards the edge of of the frame, with wider fields of view having increasingly large distortion.