Skip to content

Repository files navigation

Rectangulator

An algorithm and demo program. The algorithm combines a grid of discrete tiles into a reduced set of rectangles via a greedy sweep. This is useful for optimizations related to 2D space (collision checking, pathfinding, etc.). This is designed to run fast enough to use in realtime applications, and not to find a minimal solution.

Demo animation

The algorithm code is in Rectangulator.

For rendering the demo, libGDX is used. The RectangulatorDemo class renders the result in 3D with an interactive perspective camera.

This isn't published as a library, and is meant to be a demoable code snippet. The code here is styled in an exhaustive and explicit way, rather than "abstract and clean".

Feel free to grab the implementation and port it to whatever you're working on.

Requirements

  • JDK 8: the build requires Java 1.8. Make sure you've pointed your JAVA_HOME environment variable at the JDK so that the bundled Gradle script can build the project.

Build

./gradlew desktop:run

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages