The Tektosyne Library for Java provides algorithms for computational geometry and graph-based pathfinding, along with supporting mathematical utilities and specialized collections.
The following list gives a summary of Tektosyne’s main features. See the User’s Guide and the Javadoc class reference for more details.
-
Geometric primitives: points (doubling as vectors), sizes, line segments, and rectangles, all available with int and double coordinates
-
Geometric algorithms: convex hull, point in polygon, intersections of two or more line segments, point location relative to line segments and rectangles, etc.
-
Lexicographic point ordering preferring x- or y-coordinates, with efficient nearest point and range search in sorted standard collections
-
Graph algorithms: A* pathfinding, path coverage, flood fill, line of sight, all performed on interfaces that can be implemented by arbitrary concrete geometric structures
-
Planar subdivision represented as doubly-connected edge list (DCEL), with support for graph algorithms, dynamic modification, and fast point location
-
Regular polygons and rectangular grids of squares or hexagons, with support for graph algorithms, mapping between grid & display coordinates, and conversion to DCEL subdivision
-
Voronoi diagram and Delaunay triangulation, with conversion to DCEL subdivision and consequently support for graph algorithms
-
Collections: generic linked list and generic quadrant tree, both with exposed node structure
-
Mathematical helper methods, including a library of Fortran 90 functions
The repository includes a JavaFX demo application that allows you to interactively explore many of these algorithms. Screenshots of two demo dialogs appear below.
-
Planar Subdivision Test: visualization and interactive manipulation of a randomly generated planar subdivision. The highlighted half-edge and vertex are nearest the (hidden) mouse cursor.
-
Graph Algorithms Test: shows A* pathfinding along the edges of a Delaunay triangulation (yellow dashes) of a random Voronoi diagram whose regions were assigned random step costs.
The Tektosyne library itself requires only the Java SE 8 Compact 1 profile, or the module java.base on Java SE 9 and later.
Tektosyne is available via mavenCentral and JCenter:
dependencies {
compile group: 'org.kynosarges', name: 'tektosyne', version: '6.2.0'
}
<dependencies>
<dependency>
<groupId>org.kynosarges</groupId>
<artifactId>tektosyne</artifactId>
<version>6.2.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Tektosyne is © 2002–2018 by Christoph Nahr but available for free under the MIT license.
The maintainer of the repository is not the original author of tektosyne, but liked the library so much that he decided to upload it to GitHub and distribute it via mavenCentral and jcenter.
This repository is just a mirror and not the official upload site, but was created with the consent of the original author. To report bugs please contact Christoph Nahr
The maintainer will try to keep the repository in sync with releases published on the Kynosarges website.