昔作ったグラフを書くプログラム。何で書いたのはわからない。
昔作ったグラフを書くプログラム。何で書いたのはわからない。
;x=cos(t)
;y=sin(t)
#include "hspmath.as"
;mes pow(2, 5);階乗
;以上メモ
title "媒介変数"
*main
cls 0
s=0.01
screen 0,1000,600,0
screen 1,1000,600,2
color 0,255,0
line 0,300,1000,300
color 0,0,0
;mmload "a.mp3",0,1
;mmplay 0
*top
gsel 1
t=s+0.003
xa=100.0*cos(1.5*s)+500.0
ya=100.0*sin(2.0*s)+300.0
xb=100.0*cos(1.5*t)+500.0;x座標
yb=100.0*sin(2.0*t)+300.0;y座標
;-100.0*sin(t)
dxa=xa-1.5*100.0*sin(1.5*s);速度ベクトルのx成分
dya=ya+2.0*100.0*cos(2.0*s);速度ベクトルのy成分
ddxa=xa-1.5*1.5*100.0*cos(1.5*s);加速度ベクトルのx成分
ddya=ya-2.0*2.0*100.0*sin(2.0*s);加速度ベクトルのy成分
color 100,100,200
line xa,ya,xb,yb
gsel 0
pos 0,0
gcopy 1,0,0,1000,600
color 0,255,255
line xb,yb,dxa,dya;速度ベクトル
color 200,55,0
line xb,yb,ddxa,ddya;加速度ベクトル
redraw 1;反映させる
;pos 0,0
;na=(dxa-xa)*(ddxa-xa)+(dya-ya)*(ddya-ya);内積計算
;mes na
s=t
await 0.1
color 255,255,255
pos 0,0
redraw 0;下ごしらえ
;mes na
line xb,yb,dxa,dya
line xb,yb,ddxa,ddya
color 0,0,0
;gcopy
if s>13000.0{
;dialog "終わりました",1,"メッセージ"
;dialog "もう一度しますか",2,"メッセージ"
;if stat=7 : end
;if stat=6 : goto *main
;end
end
}
goto *top