graphics

The graphics parameter renders quadrilles onto a custom p5.Graphics buffer, enabling flexible compositing and advanced texturing.

Example 1

(click and drag the canvas to move the quadrille graphics)

edit, then run

Note

This example shows how to render a quadrille onto a p5.Graphics object, allowing it to be used as a dynamic image (image()). The rendered graphics object can be moved independently of the main canvas, enabling layering and modular manipulation.

Example 2

(click and drag to orbit; dynamic Game of Life pattern rendered as a 3D texture)

edit, then run

Note

This example highlights the use of a p5.Graphics object to render a quadrille and apply it as a 3D texture in a WEBGL environment. The quadrille represents a Game of Life simulation, with its updated state drawn onto the graphics object, decoupling the simulation from the main canvas for advanced visualization.

Syntax

drawQuadrille(quadrille, { graphics })

Parameters

Param Description
graphics p5.Graphics: Renderer target. Defaults to this (main canvas)
What this page's examples use
p5.quadrille
drawQuadrille createQuadrille cellLength visit width clone height or isFilled ring
p5.js
createCanvas background color noStroke frameCount createGraphics mouseY mouseX rotateY WEBGL image mouseIsPressed orbitControl PI sphere

Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.