#define pi 3.141592653589793238462643383279
#define r2 180.0 //外側の半径
#const _rad pi*2.0/360.0
#const _hue 191.0/360.0
#define ctype rad(%1) (double(%1)*_rad)
#define ctype hue(%1) (double(%1)*_hue)
cx = 320 : cy = 240 : ddim rr,361
title "元データ"
redraw 0 : repeat 360
r1 = 1.0*rnd(20)+ 130
p1x = cx + r1 * cos(rad(cnt))
p1y = cy + r1 * sin(rad(cnt))
p2x = cx + r2 * cos(rad(cnt))
p2y = cy + r2 * sin(rad(cnt))
line p1x , p1y , p2x , p2y
rr(cnt) = r2-r1
loop : redraw 1
bsave "test_rr.dat",rr
wait 50 : cls : ddim rr,361
title "ロードしたデータ"
bload "test_rr.dat",rr
color 0,0,255
redraw 0 : repeat 360
p1x = cx + (r2-rr(cnt)) * cos(rad(cnt))
p1y = cy + (r2-rr(cnt)) * sin(rad(cnt))
p2x = cx + r2 * cos(rad(cnt))
p2y = cy + r2 * sin(rad(cnt))
line p1x , p1y , p2x , p2y
loop : redraw 1