Mapping to the globe view

Hello, everyone! That is the video about the mapping from flat
view to globe view. The bad news is that there is no map projection
without distortion. On the other side, there is a number of them
and we can choose the most appropriate for the current state of the art. Each mapping has own pros and cons. For me, the most important property of projection
is distortion coefficients along parallels and meridians. To calculate them I will use the concept of
so-called Tissot’s indicatrix or ellipse of distortion. So, I picked up map projection which called
“Gall stereographic projection”. Using it we can get longitude and latitude
from rectangular mesh coordinates by the formulas: Then using spherical coordinates system we
get coordinates on the globe: If each object that we draw has a ‘view’ components
and all views have common superclass than that class is a good place for those mappings. For example, if boolean called ‘flat view’
is true objects are rendered using rectangular map coordinates, otherwise objects use mapping
to spherical coordinates. The result looks like this. Looks correct until we’ll try to add some
objects. The circle at flat view will be distorted
at globe view and vice versa. So as I mentioned before we need to calculate
distortion coefficients. For that purpose, we need projection mapping
and a bit of calculus. The general formulas look like this: After calculation of derivatives we get the
following: Let’s uncomment code for scaling using pre-calculated
coefficients. Now it looks better. For the sake of example, I’ve made area green
and added a little offset to height. That concludes that video about mapping to
globe view. Thank you for watching!

Add a Comment

Your email address will not be published. Required fields are marked *