[ Open Generator | Open in p5.js Web Editor ]
A p5.js-friendly customizable kerf bending pattern generator for laser cutting and engraving.
The easiest way to design your own custom pattern is to open the generator sketch in p5.js Web Editor and modify the kerfCustom()
function in custom.js
.
function kerfCustom(centerX, centerY, kerfWidth, kerfHeight, direction) {
rectMode(CENTER);
rect(centerX, centerY, kerfWidth, kerfHeight);
}
This function defines an individual element of the pattern based on five parameters: centerX
, centerY
, kerfWidth
, kerfHeight
, and direction
. The values of the first four parameters are in pixels, and the value of the last parameter is either 1
or -1
, which alternates in the final pattern grid. If your custom design is not directional, simply ignore the last parameter (as demonstrated in the example above).
Feel free to share your unique design by following the same code structure in sketch.js
and creating a pull request.
This project is released under the MIT License.