createQuadrille(width, height)

Creates an empty quadrille having width number of columns and height number of rows.

Example #

code
// quadrille object declaration
let quadrille;

function setup() {
  // Quadrille.cellLength is a constant defining the quadrille
  // cell length default is: 100
  createCanvas(6 * Quadrille.cellLength, 4 * Quadrille.cellLength);
  // quadrille object initialization
  quadrille = createQuadrille(6, 4);
}

function draw() {
  background('violet');
  // to display the quadrille a call to drawQuadrille is needed
  drawQuadrille(quadrille);
}
createQuadrille(width, height) creates an empty quadrille with the given dimensions. See fill and rand for ways to populating it.

Syntax #

createQuadrille(width, height)

Parameters #

ParamDescription
widthNumber: total number of columns
heightNumber: total number of rows