|
https://ja.wikipedia.org/wiki/ミラー図法
メルカトル図法で投影します
SET BITMAP SIZE 800,600
SET WINDOW -180,180,-3,3
OPEN #1:NAME "world_50m.txt" !'「world_10m.txt」「world_50m.txt」「world_110m.txt」のいずれか。パスを指定。
SET #1: ENDOFLINE CHR$(10)
DO
INPUT #1,IF MISSING THEN EXIT DO:A$
IF A$<>"" THEN
LET Z=POS(A$," ")
LET KEIDO=VAL(A$(1:Z))
LET IDO=VAL(A$(Z+1:LEN(A$)))
LET X=KEIDO
LET Y=INVGD(RAD(IDO)) !'メルカトル図法
!' LET Y=5/4*INVGD(4/5*RAD(IDO)) !'ミラー図法
PLOT LINES:X,Y;
ELSE
PLOT LINES
END IF
LOOP
CLOSE #1
SET LINE STYLE 3
FOR KEIDO=-180 TO 180 STEP 30
FOR IDO=-90 TO 90 STEP 15
LET X=KEIDO
LET Y=INVGD(RAD(IDO))
!' LET Y=5/4*INVGD(4/5*RAD(IDO))
PLOT LINES:X,Y;
NEXT IDO
PLOT LINES
NEXT KEIDO
FOR IDO=-90 TO 90 STEP 15
FOR KEIDO=-180 TO 180 STEP 30
LET X=KEIDO
LET Y=INVGD(RAD(IDO))
!' LET Y=5/4*INVGD(4/5*RAD(IDO))
PLOT LINES:X,Y;
NEXT KEIDO
PLOT LINES
NEXT IDO
END
EXTERNAL FUNCTION INVGD(X) !'逆グーデルマン関数
LET INVGD=ATANH(SIN(X))
END FUNCTION
EXTERNAL FUNCTION ATANH(X)
IF ABS(X)=1 THEN
LET ATANH=SGN(X)*9999 !' 無限大
ELSE
LET ATANH=LOG((1+X)/(1-X))/2 !'arc-hyperbolic tangent
END IF
END FUNCTION
|
|