//カーブのパラメータ
DATA_LR = [0, 0, 1, 0, 6, -6, -4, -2, 0];
CLEN = DATA_LR.length;
CMAX = BOARD*CLEN;
function make_course(){
for(i=0; i <CLEN; i++){
lr1 = DATA_LR[i];
lr2 = DATA_LR[(i+1)%CLEN];
for(j=0; j < BOARD; j++){
pos = j+BOARD*i;
//x座標のパーセント
curve[pos] = lr1*(BOARD-j)/BOARD + lr2*j/BOARD;
}
}
//標準の長さ
for(i=0; i <BOARD; i++){
BOARD_W[i] = 10+(BOARD-i)*(BOARD-i)/12;
BOARD_H[i] = 3.4*(BOARD-i)/BOARD;
BOARD_UD[i] = 2*Math.sin(i*1.5*(Math.PI/180));
}
DATA_LR = [0, 0, 0, 0, 0, 0, 0, 0, 0];
DATA_UD = [0,-2,-4,-6,-4,-2, 2, 4, 2];
function make_course(){
for(i=0; i <CLEN; i++){
lr1 = DATA_LR[i];
lr2 = DATA_LR[(i+1)%CLEN];
ud1 = DATA_UD[i];
ud2 = DATA_UD[(i+1)%CLEN];
for(j=0; j < BOARD; j++){
pos = j+BOARD*i;
curve[pos] = lr1*(BOARD-j)/BOARD + lr2*j/BOARD;
updown[pos] = ud1*(BOARD-j)/BOARD + ud2*j/BOARD;
}
}
}