gridpattern icon indicating copy to clipboard operation
gridpattern copied to clipboard

"poisson disc" "grid"

Open trevorld opened this issue 3 years ago • 0 comments

  • Could be helpful / cool to add a "poisson disc' "grid" (on top of currently existing "square", "hex", "hex_circle", and "elongated_triangle" grids)

    • Could be especially nice combined with adding #61
    • Could be fun for existing geometry patterns as well
  • Some packages which implement such sampling:

    • https://github.com/will-r-chase/poissondisc
    • https://github.com/coolbutuseless/poissoned
  • Would likely need to refactor a bunch of the geometry patterns so can use pre-existing regular grids with a random grid:

    • Currently when generating grids we just compute x values and then compute y values (plus some other info) which would be insufficient knowledge since for "poisson disc" we need joint x,y values

    • When using a "pattern" to color points in the "poisson disc" "grid" how should we partition the poisson "points" to their various pattern "colors"? Two possible approaches I see:

      • coolbutuseless's {poissoned} defines a "grid" of cells where each cell (I think) has either one or zero "points" in it. Could do the pattern on same "grid" of cells. Assign "point" to "pattern" if "point" exists in "poisson disc" cell and also exists in "pattern" cell. Since some points will be "missing" may lead to distracting/charming gaps in "pattern".
      • Add points (possibly offstage and not visible) so there are nrows * ncols poisson points. We can then separately use some kind of tree on x/y values to assign "points" to "regular" cells that correspond to a nrows * ncols matrix of "pattern" cells.
  • We'll probably want to adjust "density" up so "density = 1" corresponds to no overlap (for circle shape) if the "points" are at the "minimum" possible distance

trevorld avatar Sep 01 '22 18:09 trevorld