@pirireis/webglobeplugins 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -107,14 +107,16 @@ vec3 circleLimpFromLongLatRadCenterCartesian3D( vec2 center, float radius, float
|
|
|
107
107
|
`;
|
|
108
108
|
|
|
109
109
|
// TODO: Make it precise. Y axis is not correct.
|
|
110
|
+
|
|
111
|
+
// ln | tan [ (x/2) + (π/4) ] | + C
|
|
110
112
|
export const circleLimpFromLongLatRadCenterMercatorRealDistance = `
|
|
111
113
|
vec2 circleLimpFromLongLatRadCenterMercatorRealDistance(vec2 center, float radius, float angle){
|
|
112
114
|
float radius_radian = radius / R;
|
|
113
115
|
float lat = center.y - radius_radian * sin(angle);
|
|
114
116
|
float scale = 1.0/abs( cos( lat ) );
|
|
117
|
+
float y = log( tan( PI / 4.0 + lat / 2.0 ) ) * R;
|
|
115
118
|
vec2 center_ = longLatRadToMercator(center);
|
|
116
119
|
float x = center_.x + scale * radius * cos(angle);
|
|
117
|
-
float y = center_.y - scale * radius * sin(angle);
|
|
118
120
|
return vec2(x, y);
|
|
119
121
|
}
|
|
120
122
|
`;
|