Skip to content

tesselations.scad

pinkfish edited this page Sep 23, 2025 · 11 revisions

LibFile: tesselations.scad

This file has all the modules needed to make a variety of tesselations.

To use, add the following lines to the beginning of your file:

include <boardgame_toolkit.scad>

File Contents

Module: EscherLizardSingle()

Description:

Creates a single escher lizard.

Arguments:

By Position What it does
size the size of the lizard

Example 1:

EscherLizardSingle() Example 1
include <boardgame_toolkit.scad>
EscherLizardSingle(size=20);




Module: EscherLizardTriangle()

Description:

Makes the triangle that can be used to fill in the escher lizard tesselation in a wider group. This will not need to be rotated.

Arguments:

By Position What it does
size size the hex
thickness thickness of the walls/edges
outer_offset how much padding on the outside

Example 1:

EscherLizardTriangle() Example 1
include <boardgame_toolkit.scad>
HexagonalTesselationTriangle(size=20)
   EscherLizardHexTesselation(radius=10, thickness=1);




Module: HexagonalTesselationTriangle()

Description:

Makes the triangle that can be used to fill in the hexagonal tesselation in a wider group. This will not need to be rotated.

Arguments:

By Position What it does
size size the hex

Example 1:

HexagonalTesselationTriangle() Example 1
include <boardgame_toolkit.scad>
HexagonalTesselationTriangle(size=20)
   EscherLizardHexTesselation(radius=10, thickness=1);




Module: EscherLizardSingleOutline()

Description:

Creates a single escher lizard with an outline.

Arguments:

By Position What it does
size the size of the lizard

Example 1:

EscherLizardSingleOutline() Example 1
include <boardgame_toolkit.scad>
EscherLizardSingleOutline(size=20, thickness=1);




Module: EscherLizardRepeatAtLocation()

Description:

Used to create an escher lizard at a specific spot in a grid given an x and a y location.

Arguments:

By Position What it does
x the x location to generate at
y the y location to generate at
size the size of the lizard
thickness the thickness of the lines
outer_offset extra space to put around the shape.

Example 1:

EscherLizardRepeatAtLocation() Example 1
include <boardgame_toolkit.scad>
EscherLizardRepeatAtLocation(x=0, y=0, size=20, thickness=1);



Example 2:

EscherLizardRepeatAtLocation() Example 2
include <boardgame_toolkit.scad>
EscherLizardRepeatAtLocation(x=0, y=0, size=20, thickness=1, outer_offset=0.1);

Module: EscherLizardRepeat()

Description:

Creates an escher lizard blob that can be repeated.

Arguments:

By Position What it does
size the size of the lizard

Example 1:

EscherLizardRepeat() Example 1
include <boardgame_toolkit.scad>
EscherLizardRepeat(rows=4, cols=4, size=20, thickness=1);




Module: HexagonTesselationRepeatAtLocation()

Description:

Used to create a hexagonal tesselation at a specific spot in a grid given an x and a y location.

Arguments:

By Position What it does
x the x location to generate at
y the y location to generate at
size the size of the lizard
thickness the thickness of the lines

Example 1:

HexagonTesselationRepeatAtLocation() Example 1
include <boardgame_toolkit.scad>
HexagonTesselationRepeatAtLocation(x=0, y=0, size=20)
   EscherLizardTriangle(size=20, thickness=1);




Module: HexagonTesselationRepeat()

Description:

Creates any hexagonal tesselation spaced correctly, using the triangle layout.

Arguments:

By Position What it does
size the size of the tesselation

Example 1:

HexagonTesselationRepeat() Example 1
include <boardgame_toolkit.scad>
HexagonTesselationRepeat(rows=4, cols=4, size=20)
    EscherLizardTriangle(size=20, thickness=1);



Example 2:

HexagonTesselationRepeat() Example 2
include <boardgame_toolkit.scad>
HexagonTesselationRepeat(rows=4, cols=4, size=20)
    RhombiTriHexagonal(40); // need to double this since not using a triangle

Module: TriangleTesselationRepeatAtLocation()

Description:

Used to create a triangle tesselation at a specific spot in a grid given an x and a y location.

Arguments:

By Position What it does
x the x location to generate at
y the y location to generate at
size the size of the lizard
thickness the thickness of the lines

Example 1:

TriangleTesselationRepeatAtLocation() Example 1
include <boardgame_toolkit.scad>
TriangleTesselationRepeatAtLocation(x=0, y=0, size=20)
    EscherLizardTriangle(size=20, thickness=1);




Module: TriangleTesselationRepeat()

Description:

Creates any triangle tesselation spaced correctly.

Arguments:

By Position What it does
size the size of the tesselation

Example 1:

TriangleTesselationRepeat() Example 1
include <boardgame_toolkit.scad>
TriangleTesselationRepeat(rows=4, cols=4, size=20)
    HalfRegularHexagon(20);




Function: VoronoiPoints()

Description:

Generates a set of Voronoi points to use in the system to make the nice voronoi pattern.


Function: NormalizeVector()

Description:

Normalizes the vector to a size of 1, but keeps the relative sizes.


Module: Vornonoi()

Description:

Creates a voronoi pattern to use on lids (and elsewhere).

Arguments:

By Position What it does
width width of the space to fill
length length of the space to fill
thickness thickness of the gaps between the shapes
corner_size how much rounding to use in the corners
cellsize the size of the cells in the space
seed the seed to use for the random number (degault default_voronoi_seed)
allowable how much space to randomize within the cell

Example 1:

Vornonoi() Example 1
include <boardgame_toolkit.scad>
Voronoi(width=100, length=100, thickness=1.5);




Module: HexagonalTesselation()

Description:

Make a tessealation around a hex. It will distort the sides using the input sets for each side. Each goes from -0.5 - 0.5 in the x direction using the set of points to create the line.

Arguments:

By Position What it does
points set of three lines to use as points on the hex.
radius the radius of the hex.

Example 1:

HexagonalTesselation() Example 1
include <boardgame_toolkit.scad>
HexagonalTesselation(
  points=[
    [[-0.5, 0], [0, 0.2], [0.5, 0]],
    [[-0.5, 0], [0, -0.2], [0.5, 0]],
    [[-0.5, 0], [0.3, 0.2], [0.5, 0]],
  ]
);




Module: SquareTesselation()

Description:

Make a tessealation around a square. It will distort the sides using the input sets this only needs two sides. Each goes from -0.5 - 0.5 in the x direction using the set of points to create the line.

Arguments:

By Position What it does
points set of two lines to use as points on the square.
size the size of the square (width, length).
thickness the thickness of the outline, if non-0 adds an outline.
outer_offset how much to offset the edge by so it overlaps in a pattern, added to the outside.

Example 1:

SquareTesselation() Example 1
include <boardgame_toolkit.scad>
SquareTesselation(
  points=[
    [[-0.5, 0], [0, 0.2], [0.5, 0]],
    [[-0.5, 0], [0, -0.2], [0.5, 0]],
  ],
  size=[20,20]
);



Example 2:

SquareTesselation() Example 2
include <boardgame_toolkit.scad>
linear_extrude(height = 2)
RegularPolygonGrid(
  width=20, rows=5, cols=5, spacing=0,
  shape_edges=4, aspect_ratio=1.0,
  space_width=20, space_length=20
)
  SquareTesselation(
    points=[
      [[-0.5, 0], [0.2, 0.3], [0.5, 0]],
      [[-0.5, 0], [0.1, 0.2], [0.5, 0]],
    ],
    size=[20, 20], thickness=1, outer_offset=0.1
  );




Module: EscherLizardHexTesselation()

Description:

A hex tesselation of the esched lizard, this can be rotated and used to fill in hex spaces when doing tesselations.

Arguments:

By Position What it does
radius the radius of the hex to use

Example 1:

EscherLizardHexTesselation() Example 1
include <boardgame_toolkit.scad>
EscherLizardHexTesselation(radius=29);




Module: TesselationDrop()

Description:

Creates a drop tesselation.

Arguments:

By Position What it does
size the size of the drop ([x,y])
arc_offset how wide the arc should be.
thickness the thickness of the wall (if non 0)
outer_offset the amount to add to the outside of the shape for layout
arc_points how many points on the arc

Example 1:

TesselationDrop() Example 1
include <boardgame_toolkit.scad>
TesselationDrop(size = [20,20]);




Module: TesselationLeaf()

Description:

A solid leaf for use with tesselations.

Arguments:

By Position What it does
size size of the leaf

Example 1:

TesselationLeaf() Example 1
include <boardgame_toolkit.scad>
TesselationLeaf(40);




Module: TesselationLeafOutline()

Description:

A leaf outline for use with tesselations.

Arguments:

By Position What it does
size size of the leaf
thickness thickness of the sides
with_veins show veins in the leaf
vein_thickness how thick to make the veins in the leaf

Example 1:

TesselationLeafOutline() Example 1
include <boardgame_toolkit.scad>
TesselationLeafOutline(40);



Example 2:

TesselationLeafOutline() Example 2
include <boardgame_toolkit.scad>
TesselationLeafOutline(40, with_veins=true);




Module: TesselationLeafOutlineThree()

Description:

A leaf outline for use with tesselations, this groups into three to make layout a lot easier.

Arguments:

By Position What it does
size size of the leaf
thickness thickness of the sides
with_veins show veins in the leaf
vein_thickness how thick the veins in the lid are

Module: DeltoidTrihexagonalTiling()

Description:

A tesselation to use with the layout to make nice triagnel layout hex pattern.

Arguments:

By Position What it does
size size of the hex
thickness thickness of the sides
outer_offset how much to offset the outside edge
kite do a kite tiling

Example 1:

DeltoidTrihexagonalTiling() Example 1
include <boardgame_toolkit.scad>
DeltoidTrihexagonalTiling(20);



Example 2:

DeltoidTrihexagonalTiling() Example 2
include <boardgame_toolkit.scad>
DeltoidTrihexagonalTiling(20, kite=true);




Module: HalfRegularHexagon()

Description:

A half regular hexagon to use with the layout to make nice layout. This is actually based on a triangle tesselation with rotations

Arguments:

By Position What it does
size size of the hex
thickness thickness of the sides
outer_offset how much to offset the outside edge

Example 1:

HalfRegularHexagon() Example 1
include <boardgame_toolkit.scad>
HalfRegularHexagon(20);




Module: RhombiTriHexagonal()

Description:

A rhombitrihexagon layout, which makes a nifty tesselation. This is actually based on a triangle tesselation with rotations

Arguments:

By Position What it does
size size of the hex
thickness thickness of the sides
outer_offset how much to offset the outside edge

Example 1:

RhombiTriHexagonal() Example 1
include <boardgame_toolkit.scad>
RhombiTriHexagonal(20);




Clone this wiki locally