Creates a quadrille and fills its cells using the specified value, which is randomly repeated throughout the quadrille up to order number of times. The dimensions of the quadrille are determined by width and height.
Example #
code
let quadrille;
function setup() {
createCanvas(6 * Quadrille.cellLength, 4 * Quadrille.cellLength);
quadrille = createQuadrille(6, 4, 13, 150);
}
function draw() {
background('orange');
drawQuadrille(quadrille);
}To define different values in createQuadrille(width, height, order, value), refer to createQuadrille(jagged_array).Syntax #
createQuadrille(width, height, order, value)
Parameters #
| Param | Description |
|---|---|
width | Number: The total number of columns for the quadrille |
height | Number: The total number of rows for the quadrille |
order | Number: The number of non-empty cells to be filled with the value |
value1 | Any: valid JavaScript value, with null representing empty cells |