georgette = {
const col_top = ['#000','#f60','#cff','#f6f','#f0f','#060','#099','#f33','#aef','#3c0'];
const col_down = ['#000','#333','#666','#f0f','#000','#930','#c63','#000','#f00','#c00'];
const u = 7;
const wu = 500;
const hu = 100;
const width = wu*u*2;
const height = hu*u*2;
const margin = 2*20;
const board_height = height;
const board_width = width;
let data_top, data_down, new_top, new_down, r, l, x, y, digit_top, digit_down;
let ray = 0.7;
let trans_x = (board_width - width)/2;
let trans_y = (board_height - height)/2;
const { canvas, context } = createCanvas();
const pixelRatio = resize(canvas, board_width + 2*margin, board_height + 2*margin, );
context.globalAlpha = 1;
context.scale(pixelRatio, pixelRatio);
context.fillStyle = '#fff';
context.fillRect(0, 0, board_width+2*margin, board_height+2*margin);
const base = get_pi_txt(wu+1);
data_top = [[]];
data_down = [[]];
data_top[0] = base;
data_down[0] = base;
for (let h = 1; h < hu; ++h){
data_top[h] = [];
data_down[h] = [];
for (let w = 0; w < wu; ++w) {
if(w < h){
new_top = 0;
new_down = 0;
} else {
r = data_top[h-1][w];
l = data_top[h-1][w-1];
new_top = alg_top(l, r);
r = data_down[h-1][w];
l = data_down[h-1][w-1];
new_down = alg_top(l, r);
}
data_top[h][w] = new_top;
data_down[h][w] = new_down;
}
}
for (let h = 0; h < hu; ++h){
for (let w = 0; w < wu; ++w) {
context.globalAlpha = 1;
digit_top = data_top[h][w];
if(digit_top != 0){
x = u*w*2 - h*u + margin/2 + trans_x;
y = (hu-h)*u + margin/2 + trans_y;
context.fillStyle = col_top[digit_top];
context.fillRect(x, y, u, u);
}
context.globalAlpha = 0.4;
digit_down = data_down[h][w];
if(digit_down != 0 & h != 0){
x = u*w*2 - h*u + margin/2 + trans_x;
y = h*u + margin/2 + hu*u + trans_y;
context.fillStyle = col_down[digit_down];
context.fillRect(x, y, u, u);
}
}
}
return canvas;
}