Skip to content

Function: fitCount() ​

ts
function fitCount(
   options, 
   count, 
   fit?
): FitResult;

Find a tile size giving about count usable cells: scales the pattern (tileScale) and searches, laying out a few dozen times. The tile count changes in steps, and not always monotonically (tiles at the edge come and go), so for random and aperiodic patterns, or "whole" cells, the result may land a little above count.

Parameters ​

ParameterType
optionsLayoutOptions
countnumber
fitFitOptions

Returns ​

FitResult

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).