image.js1linklet quadrille;2linklet image;3link4linkfunction preload() {5link  image = loadImage('mahakala.jpg');6link}7link8linkfunction setup() {9link  createCanvas(800, 360);10link}11link12linkfunction draw() {13link  if (frameCount % 200 === 0) {14link    let scl = 2 ** int(random(4));15link    quadrille = createQuadrille(20 * scl, image);16link    drawQuadrille(quadrille, {cellLength: 40 / scl, outlineWeight: 1.6 / scl, outline: color(random(255))});17link  }18link}

In geometry, the square-tiling, square-tessellation or square-grid is a regular tiling of the Euclidean plane. John Horton Conway called it a quadrille.

The internal angle of the square is π/2 so four squares at a point make a full 2π angle. It is one of three regular tilings of the plane. The other two are the triangular-tiling and the hexagonal-tiling.

The library comprises a Quadrille class and provides the createQuadrille and drawQuadrille p5 functions. The Quadrille class implements geometry transformation and constructive solid geometry-like logical operators, and visual computing methods such as image filtering using convolution matrices and triangle rasterization. It also implements several memory management methods, such as clear, clone, fill, insert, replace and sort. It can be used as an interface to convert to / from other representations such as arrays, images and bitboards.

The library reference together with a demo which illustrates most of its functionality, are found along this site.

Home

p5.js functionschevron_right

Properties

I/Ochevron_right
Boolean operatorschevron_right
Geometry transformationschevron_right
Visual computingchevron_right
Other representationschevron_right

Demo