Conversion to SVG

Each Tiling object has a toSVG(...) method that returns a Scalable Vector Graphics XML, describing the vector image.

import io.github.scala_tessella.tessella.conversion.SVG.*

val uniform3gonal2: Tiling = Tiling.pattern_2x333333_33336(4, 4).toOption.get
uniform3gonal2.toSVG(showPerimeter = false, labelledNodes = LabelledNodes.NONE) // returns a SVG as scala.XML.Elem
minimal
Finite set of a [2x(3₆);(3₄.6)] pattern with edges only

Options

Several parameters can be mixed to add one or more information layers.

Node labels

uniform3gonal2.toSVG(showPerimeter = false, labelledNodes = LabelledNodes.ALL)
labels
Finite set of a [2x(3₆);(3₄.6)] pattern with node labels

Animated node order

uniform3gonal2.toSVG(showPerimeter = false, labelledNodes = LabelledNodes.NONE, showGrowth = true)
gonality
Finite set of a [2x(3₆);(3₄.6)] pattern with animation following node order

Perimeter

uniform3gonal2.toSVG(showPerimeter = true, labelledNodes = LabelledNodes.NONE)
perimeter
Finite set of a [2x(3₆);(3₄.6)] pattern with highlighted perimeter

Polygons

uniform3gonal2.toSVG(showPerimeter = false, fillPolygons = true, labelledNodes = LabelledNodes.NONE)
polygons
Finite set of a [2x(3₆);(3₄.6)] pattern with filled polygons colored according to size

Gonality

uniform3gonal2.toSVG(showPerimeter = false, labelledNodes = LabelledNodes.NONE, markStyle = MarkStyle.GONALITY)
gonality
Finite set of a [2x(3₆);(3₄.6)] pattern with dots marking nodes with the same adjacent polygons

Uniformity

uniform3gonal2.toSVG(showPerimeter = false, labelledNodes = LabelledNodes.NONE, markStyle = MarkStyle.UNIFORMITY)
uniformity
Finite set of a [2x(3₆);(3₄.6)] pattern with dots marking nodes with the same adjacent pattern

Dual

uniform3gonal2.toSVG(showPerimeter = false, labelledNodes = LabelledNodes.NONE, showDual = true)
dual
Finite set of a [2x(3₆);(3₄.6)] pattern with dual tessellation
The source code for this page can be found here.