{"id":32388857,"url":"https://github.com/delfrrr/delaunator-cpp","last_synced_at":"2025-10-25T03:56:19.092Z","repository":{"id":45390449,"uuid":"144940453","full_name":"delfrrr/delaunator-cpp","owner":"delfrrr","description":"A really fast C++ library for Delaunay triangulation of 2D points","archived":false,"fork":false,"pushed_at":"2021-10-28T16:12:27.000Z","size":2336,"stargazers_count":432,"open_issues_count":30,"forks_count":93,"subscribers_count":20,"default_branch":"master","last_synced_at":"2023-11-07T16:25:27.153Z","etag":null,"topics":["2d","algorithm","computational-geometry","cpp","delaunay","mapbox","triangulation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delfrrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-16T05:23:54.000Z","updated_at":"2023-10-30T20:29:02.000Z","dependencies_parsed_at":"2022-08-25T13:41:25.235Z","dependency_job_id":null,"html_url":"https://github.com/delfrrr/delaunator-cpp","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"purl":"pkg:github/delfrrr/delaunator-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfrrr%2Fdelaunator-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfrrr%2Fdelaunator-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfrrr%2Fdelaunator-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfrrr%2Fdelaunator-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delfrrr","download_url":"https://codeload.github.com/delfrrr/delaunator-cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delfrrr%2Fdelaunator-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280901443,"owners_count":26410586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","algorithm","computational-geometry","cpp","delaunay","mapbox","triangulation"],"created_at":"2025-10-25T03:56:17.900Z","updated_at":"2025-10-25T03:56:19.085Z","avatar_url":"https://github.com/delfrrr.png","language":"C++","readme":"# delaunator-cpp\n\nA really fast C++ library for\n[Delaunay triangulation](https://en.wikipedia.org/wiki/Delaunay_triangulation) of 2D points.\n\ndelaunator-cpp is a C++ port from https://github.com/mapbox/delaunator a JavaScript implementation of very fast 2D Delaunay algorithm.\n\n[![Build Status](https://travis-ci.org/delfrrr/delaunator-cpp.svg?branch=master)](https://travis-ci.org/delfrrr/delaunator-cpp)\n[![badge](https://mapbox.s3.amazonaws.com/cpp-assets/hpp-skel-badge_blue.svg)](https://github.com/mapbox/hpp-skel)\n\n## Features\n\n* Probably the fastest C++ open source 2D Delaunay implementation\n* Example showing triangulation of GeoJson points\n\n## Usage\n\n`examples/basic.cpp`\n\n```CPP\n#include \u003cdelaunator.hpp\u003e\n#include \u003ccstdio\u003e\n\nint main() {\n    /* x0, y0, x1, y1, ... */\n    std::vector\u003cdouble\u003e coords = {-1, 1, 1, 1, 1, -1, -1, -1};\n\n    //triangulation happens here\n    delaunator::Delaunator d(coords);\n\n    for(std::size_t i = 0; i \u003c d.triangles.size(); i+=3) {\n        printf(\n            \"Triangle points: [[%f, %f], [%f, %f], [%f, %f]]\\n\",\n            d.coords[2 * d.triangles[i]],        //tx0\n            d.coords[2 * d.triangles[i] + 1],    //ty0\n            d.coords[2 * d.triangles[i + 1]],    //tx1\n            d.coords[2 * d.triangles[i + 1] + 1],//ty1\n            d.coords[2 * d.triangles[i + 2]],    //tx2\n            d.coords[2 * d.triangles[i + 2] + 1] //ty2\n        );\n    }\n}\n```\n\n[See more examples here](./examples)\n\n## Benchmarks\n\n```\nRun on (4 X 2300 MHz CPU s)\n2018-09-29 09:27:28\n------------------------------------------------------------\nBenchmark                     Time           CPU Iterations\n------------------------------------------------------------\nBM_45K_geojson_nodes         22 ms         22 ms         32\nBM_uniform/2000               1 ms          1 ms        982\nBM_uniform/100000            63 ms         62 ms          9\nBM_uniform/200000           140 ms        140 ms          4\nBM_uniform/500000           400 ms        399 ms          2\nBM_uniform/1000000          994 ms        993 ms          1\n```\n\nLibrary is ~10% faster then JS version for 1M uniform points ([details](https://github.com/delfrrr/delaunator-cpp/pull/8#issuecomment-422690056))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelfrrr%2Fdelaunator-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelfrrr%2Fdelaunator-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelfrrr%2Fdelaunator-cpp/lists"}