The Tektosyne Library for Java provides algorithms for computational geometry and graph-based pathfinding, along with supporting mathematical utilities and specialized collections. Tektosyne is © 2002–2016 by Christoph Nahr but available for free download under the MIT license.
The following list gives a summary of Tektosyne’s main features. See the User’s Guide and the included Javadoc class reference for more details.
- Geometric primitives: points (doubling as vectors), sizes, line segments, and rectangles, all available with
- 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 download package 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. The included GUI demo application requires Oracle JRE 8 Update 66 with JavaFX 8 or later, or an equivalent Java runtime environment. Windows users should consult Oracle Java on Windows to avoid Oracle’s unfortunate default Windows JRE. Please see the following for more information:
- The ReadMe file contains usage information, the copyright notice, and a feature comparison with the original .NET edition.
- The WhatsNew file contains the annotated version history of the project, including links to weblog posts with further details on each release.
- Code Package: version 6.0.0, released on 14 December 2016
- User’s Guide: version 2.0.0, released on 14 December 2016
Includes complete source code with unit tests, as well as prebuilt JAR files for both library and demo application. You need NetBeans 8.2 and Oracle JDK 8u112 to load the included project files. The code package also contains a prebuilt Javadoc class reference for the library.
Presents an overview of all public library classes and a set of sample benchmark results. Unusual features such as graph algorithms are covered in greater depth. Includes UML diagrams created with Class Diagrammer, as described in the ReadMe file.
Tektosyne for .NET
Tektosyne originally targeted the .NET Framework, hence the version number 6.0.0 for the initial Java release. I no longer maintain the .NET edition but you can download the final version here. The current User’s Guide for the Java version summarizes the library’s historical development.
In addition to the classes present in Tektosyne for Java 6.0.0, Tektosyne for .NET featured several enhanced collections, a variety of general helper classes, and utilities for Windows Presentation Foundation (WPF) and Simple MAPI messaging. See the User’s Guide below for an overview.
- Code Package & Class Reference: version 5.6.6, released on 30 September 2015
- User’s Guide: version 1.2.0, released on 09 June 2012
Includes complete source code as well as precompiled (in release mode) library, demo application, and unit tests. Also contains the XML documentation file generated by the C# compiler.
Class Reference — TektosyneNetClasses.7z (1.72 MB)
User’s Guide — TektosyneNetGuide.pdf (584 KB)
Tektosyne for .NET requires the Microsoft .NET Framework 4 Client Profile or any newer .NET 4.x running on a compatible Microsoft Windows version. .NET Core is not supported, although you should be able to extract system-independent classes for use with .NET Core. You will also need the free NUnit unit testing framework to run the included test suite.
Note: Tektosyne produces IL code that not verifiable. The library is compiled in “unsafe” mode to facilitate efficient hash code generation and various other tasks (e.g. Win32 interoperation). If you require verifiable IL code for security reasons, you must pull out the stuff you need and recompile without the “unsafe” flag. Several classes are also not CLS compliant due to the use of unsigned integers.