|
モルワイデ図法で投影します
SET BITMAP SIZE 800,400
SET WINDOW -180,180,-PI/2,PI/2
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 TH=0
FOR J=1 TO 10
LET TH=TH-(SIN(2*TH)+2*TH-PI*SIN(RAD(IDO)))/(2*COS(2*TH)+2) !'ニュートン法
NEXT J
LET X=KEIDO*COS(TH)
LET Y=PI/2*SIN(TH)
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 TH=0
FOR J=1 TO 10
LET TH=TH-(SIN(2*TH)+2*TH-PI*SIN(RAD(IDO)))/(2*COS(2*TH)+2)
NEXT J
LET X=KEIDO*COS(TH)
LET Y=PI/2*SIN(TH)
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 TH=0
FOR J=1 TO 10
LET TH=TH-(SIN(2*TH)+2*TH-PI*SIN(RAD(IDO)))/(2*COS(2*TH)+2)
NEXT J
LET X=KEIDO*COS(TH)
LET Y=PI/2*SIN(TH)
PLOT LINES:X,Y;
NEXT KEIDO
PLOT LINES
NEXT IDO
END
|
|