GithubHelp home page GithubHelp logo

z3dev / poly-bool-comparison Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daef/poly-bool-comparison

0.0 0.0 0.0 7.26 MB

Shell 23.39% JavaScript 62.06% Rust 7.32% CSS 1.62% HTML 4.23% Nix 1.38%

poly-bool-comparison's Introduction

This is a (very hacky) comparison of various polygon clipping algorithms.

shut up and take me to the damn thing

method

The 'ground truth' to compare against was approximated via a rasterization of the polygons (using inkscape) followed by the boolean operations (using graphicsmagick)

Various implementations try to do the boolean operations on the polygons, the resulting polygons are also translated to svg, rasterized with inkscape and those results are finally compared on a pixel basis, using various metrics and graphicsmagick.

dir description

dissection contains a small viewer for the results

unisamples contain the fixtures as well as conversion tools

magick contains the 'ground truth' build using graphicsmagick

algorithms

martinez_{cgal,cpp} were build from http://www4.ujaen.es/~fmartin/bop12.zip

milevski uses https://github.com/w8r/martinez

rust-geo-booleanop uses https://github.com/21re/rust-geo-booleanop

voidqk uses https://www.npmjs.com/package/polybooljs

dependencies

this is far from packed for re-use, but if you insist, the main dependencies should be node, graphicsmagick and inkscape

graphicsmagick can be downloaded (source) and compiled into a set of command line utilities. See http://www.graphicsmagick.org/README.html

inkscape can be downloaded and installed. See https://inkscape.org

running

install LTS versions of npm and node.js

now run these commands inside the poly-bool-comparison directory

npm install
npm run setup

to re-run everything try running ./run... good luck ;)

to update a single algorithm run ./run <dirname>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.