Skip to content

scala-steward/tessella

This branch is 1 commit ahead of, 1 commit behind scala-tessella/tessella:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fbb6a40 · Feb 21, 2025

History

91 Commits
Oct 13, 2024
Apr 21, 2024
Jul 14, 2024
Feb 21, 2025
Nov 22, 2024
Apr 11, 2024
Apr 11, 2024
Apr 11, 2024
Jul 16, 2024
Sep 29, 2024

Repository files navigation

Tilings by regular polygons

tessella Scala version support Maven Central Scala.js CI Scala Steward badge DOI

Tessella is a Scala 3 library, compatible with Scala.js, that helps to deal with finite unit-regular-polygon tessellations of a flat surface, a classical theme in the wider field of tessellations (or tilings).

sqrHexDodHexoid
SVG output for a Tiling of a [(4.6.12)] pattern

Tessellation as graph

Each tessellation is internally described as an undirected graph, where:

  • each node of the graph is a vertex of a polygon and it is represented by a unique Int
  • each edge of the graph is a side of a polygon

The graph describing the tessellation is a Tiling object.

Setup

Add the following dependency to your build.sbt file:

libraryDependencies += "io.github.scala-tessella" %% "tessella" % "0.3.0" // Use %%% instead of %% if you're using ScalaJS

Getting started

First, start with the following import:

import io.github.scala_tessella.tessella.Tiling.*

Then you can write something like:

Tiling.fromPolygon(5) // Tiling(1--2, 1--5, 2--3, 3--4, 4--5)
Tiling.fromPolygon(7).graphNodes // List(1, 2, 3, 4, 5, 6, 7)
Tiling.fromPolygon(4).area // 1.0

Documentation

Scaladoc

The Scaladoc API documentation can be browsed and searched here.

Website

Check the Tessella website for more info.

Deprecation warning

Tessella is replacing the previous project at https://github.com/mcallisto/tessella, now deprecated.

About

Tilings by regular polygons

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%