I have a map in Mercator projection. I know coordinates of corners. I want to render uniformly distributed dots to map.
for (float latDeg = startLatDeg; latDeg <= endLatDeg; latDeg += stepLatDeg){
for (float lonDeg = startLonDeg; lonDeg <= endLonDeg; lonDeg += stepLonDeg){
Pixel px = mercator->GetPixels(lonDeg, latDeg);
map[px.x][px.y] = dot;
}
}
where start and end values are corners of map.
This code works for longitude, obviously, since it is uniform and non-distorted. How can I achieve uniformity in latitude? I know, that I cannot use fixed step, but somekind recalculate it based on last latitude. But I dont know how.