function badgeCode(g, context, frameNumber) {
context.fillStyle = "#6e2aae";
context.fillRect(0, 0, width, height);
const n_rows = 22
const n_cols = 16
const row_space = height / (n_rows - 1)
const col_space = width / (n_cols - 1)
for (var r = 0; r < n_rows; r ++) {
for (var c = 0; c < n_cols; c++) {
context.fillStyle = "#2b3d4f";
context.beginPath();
context.arc(c * col_space - 5 + (frameNumber * col_space)/9, r * row_space + 11 + (frameNumber * col_space)/9, 23, 0, 2 * Math.PI)
context.fill();
context.fillStyle = dotfill(r,c);
context.beginPath();
context.arc(c * col_space, r * row_space, 26, 0, 2 * Math.PI)
context.fill();
}
}
}