|
バイオリズムに科学的根拠はありません
BIRTHYEARに誕生年(西暦)を
BIRTHMONTHに誕生月を
BIRTHDAYに誕生日を設定してください
DIM MM(12)
CALL GINIT(800,600)
MAT READ MM
DATA 31,28,31,30,31,30,31,31,30,31,30,31
'誕生年(西暦)を設定してください↓
LET BIRTHYEAR=
'誕生月を設定してください↓
LET BIRTHMONTH=
'誕生日を設定してください↓
LET BIRTHDAY=
LET T1=YMDT2JD(BIRTHYEAR,BIRTHMONTH,BIRTHDAY)
LET D$=DATE$
LET YEAR=VAL(D$(1:4))
LET MONTH=VAL(D$(5:6))
LET DAY=VAL(D$(7:8))
IF MONTH=2 AND (MOD(YEAR,100)<>0 AND MOD(YEAR,4)=0 OR MOD(YEAR,400)=0) THEN LET MM(2)=29
LET LENGTH=YMDT2JD(YEAR,MONTH,DAY)-T1
LET TT=LENGTH-DAY
LET PW=23 !'身体
LET SW=28 !'感情
LET IW=33 !'知性
LET PP=MOD(TT,PW)
LET SS=MOD(TT,SW)
LET II=MOD(TT,IW)
LET YS=300
LET XS=100
LET HH=60
LET A$="バイオリズム"
SET TEXT HEIGHT HH
SET TEXT COLOR 7
PLOT TEXT,AT 400-HH*LEN(A$)/2,100:A$
SET LINE COLOR 7
PLOT LINES:XS,YS;100+32*20,YS
PLOT LINES:XS,YS-120;XS+32*20,YS-120;XS+32*20,YS+120;XS,YS+120;XS,YS-120
SET TEXT HEIGHT 10
FOR J=1 TO MM(MONTH)
IF MOD(J,5)=0 THEN
PLOT LINES:XS+20*J,YS-10;XS+20*J,YS+10
PLOT TEXT,AT XS+20*J-5,YS-15:STR$(J)
ELSE
PLOT LINES:XS+20*J,YS-5;XS+20*J,YS+5
END IF
NEXT J
SET LINE COLOR 5
PLOT LINES:XS+20*DAY,YS+15;XS+20*DAY,YS+100
PLOT LINES:XS+20*DAY,YS+15;XS+20*DAY+5,YS+25
PLOT LINES:XS+20*DAY,YS+15;XS+20*DAY-5,YS+25
SET LINE COLOR 1
FOR J=1 TO MM(MONTH) !'身体
LET YY=YS+100*SIN(PI*(PP+J)/PW)
PLOT LINES:XS+J*20,YY;
NEXT J
SET LINE COLOR 2
PLOT LINES
FOR J=1 TO MM(MONTH) !'感情
LET YY=YS+100*SIN(PI*(SS+J)/SW)
PLOT LINES:XS+J*20,YY;
NEXT J
SET LINE COLOR 4
PLOT LINES
FOR J=1 TO MM(MONTH) !'知性
LET YY=YS+100*SIN(PI*(II+J)/IW)
PLOT LINES:XS+J*20,YY;
NEXT J
PLOT LINES
SET TEXT HEIGHT 20
SET LINE COLOR 1
PLOT LINES:XS,450;XS+100,450
PLOT TEXT,AT XS+110,460:"身体"
SET LINE COLOR 2
PLOT LINES:XS,480;XS+100,480
PLOT TEXT,AT XS+110,490:"感情"
SET LINE COLOR 4
PLOT LINES:XS,510;XS+100,510
PLOT TEXT,AT XS+110,520:"知性"
PLOT TEXT,AT 320,460:"誕生日 "&STR$(BIRTHYEAR)&"年"&STR$(BIRTHMONTH)&"月"&STR$(BIRTHDAY)&"日"
PLOT TEXT,AT 320,490:" 今日 "&STR$(YEAR)&"年"&STR$(MONTH)&"月"&STR$(DAY)&"日"
PLOT TEXT,AT 320,520:"経過日数 "&STR$(LENGTH)&"日"
PLOT TEXT,AT XS,550:"曲線と軸が交わる日が要注意日です"
END
EXTERNAL FUNCTION YMDT2JD(GYEAR, GMONTH, GDAY)
IF GMONTH < 3 THEN
LET CALC_GYEAR = GYEAR - 1
LET CALC_GMONTH = GMONTH + 12
ELSE
LET CALC_GYEAR = GYEAR
LET CALC_GMONTH = GMONTH
END IF
LET Y = INT(365.25 * CALC_GYEAR) + INT(CALC_GYEAR / 400) - INT(CALC_GYEAR / 100)
LET YMDT2JD = Y + INT(30.59 * (CALC_GMONTH - 2)) + 1721088 + GDAY
END FUNCTION
EXTERNAL SUB GINIT(XSIZE,YSIZE)
SET BITMAP SIZE XSIZE,YSIZE
SET WINDOW 0,XSIZE-1,YSIZE-1,0
SET POINT STYLE 1
SET COLOR MIX(0) 0,0,0
SET COLOR MIX(1) 0,0,1
SET COLOR MIX(2) 1,0,0
SET COLOR MIX(3) 1,0,1
SET COLOR MIX(4) 0,1,0
SET COLOR MIX(5) 0,1,1
SET COLOR MIX(6) 1,1,0
SET COLOR MIX(7) 1,1,1
CLEAR
END SUB
|
|