{"id":13532815,"url":"https://github.com/msokalski/delabella","last_synced_at":"2025-04-01T21:31:13.816Z","repository":{"id":37608448,"uuid":"141460605","full_name":"msokalski/delabella","owner":"msokalski","description":"2D Delaunay triangulation (dela) - super stable (bella!)","archived":false,"fork":false,"pushed_at":"2024-02-13T17:22:01.000Z","size":10780,"stargazers_count":223,"open_issues_count":2,"forks_count":26,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-02T20:31:52.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msokalski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-07-18T16:22:01.000Z","updated_at":"2024-10-24T11:53:04.000Z","dependencies_parsed_at":"2024-01-03T04:03:01.685Z","dependency_job_id":"2ac3a789-a812-47ff-a43d-75be6f74c4ca","html_url":"https://github.com/msokalski/delabella","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msokalski%2Fdelabella","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msokalski%2Fdelabella/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msokalski%2Fdelabella/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msokalski%2Fdelabella/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msokalski","download_url":"https://codeload.github.com/msokalski/delabella/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713036,"owners_count":20821834,"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","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":[],"created_at":"2024-08-01T07:01:13.937Z","updated_at":"2025-04-01T21:31:09.113Z","avatar_url":"https://github.com/msokalski.png","language":"C++","funding_links":[],"categories":["Maths","Libraries"],"sub_categories":["C++"],"readme":"# DelaBella\n## 2D Exact Delaunay triangulation\n\u003cimg alt=\"delabella\" src=\"images/delabella.gif\" width=100%\u003e\n\n- Bunch of credits must go to David for inventing such beautiful algorithm (Newton Apple Wrapper):\n\n  http://www.s-hull.org/\n\n- It is pretty well described in this paper:\n\n  https://arxiv.org/ftp/arxiv/papers/1602/1602.04707.pdf\n\n- Currently DelaBella makes use of adaptive-exact predicates by William C. Lenthe\n\n  https://github.com/wlenthe/GeometricPredicates\n  \n## What you can do with DelaBella?\n\n- Delaunay triangulations\n\n  ![delaunay](images/delaunay.png)\n\n- Voronoi diagrams\n\n  ![voronoi](images/voronoi.png)\n\n- Constrained Delaunay triangulations\n\n  ![constraints](images/constraints.png)\n\n- Interior / exterior detection based on constraint edges\n\n  ![floodfill](images/floodfill.png)\n\n## Minimalistic DelaBella usage:\n\n```cpp\n\n#include \"delabella.h\"\n// ...\n\n\t// somewhere in your code ...\n\n\tint POINTS = 1000000;\n\n\ttypedef double MyCoord;\n\n\tstruct MyPoint\n\t{\n\t\tMyCoord x;\n\t\tMyCoord y;\n\t\t// ...\n\t};\n\n\tMyPoint* cloud = new MyPoint[POINTS];\n\n\tsrand(36341);\n\n\t// gen some random input\n\tfor (int i = 0; i \u003c POINTS; i++)\n\t{\n\t\tcloud[i].x = rand();\n\t\tcloud[i].y = rand();\n\t}\n\n\tIDelaBella2\u003cMyCoord\u003e* idb = IDelaBella2\u003cMyCoord\u003e::Create();\n\n\tint verts = idb-\u003eTriangulate(POINTS, \u0026cloud-\u003ex, \u0026cloud-\u003ey, sizeof(MyPoint));\n\n\t// if positive, all ok \n\tif (verts\u003e0)\n\t{\n\t\tint tris = idb-\u003eGetNumPolygons();\n\t\tconst IDelaBella2\u003cMyCoord\u003e::Simplex* dela = idb-\u003eGetFirstDelaunaySimplex();\n\t\tfor (int i = 0; i\u003ctris; i++)\n\t\t{\n\t\t\t// do something with dela triangle \n\t\t\t// ...\n\t\t\tdela = dela-\u003enext;\n\t\t}\n\t}\n\telse\n\t{\n\t\t// no points given or all points are colinear\n\t\t// make emergency call ...\n\t}\n\n\tdelete[] cloud;\n\tidb-\u003eDestroy();\n\n\t// ...\n\n```\n\n## On the go progress information for all lengthy functions\n\n![terminal](images/terminal.gif)\n\n## Benchmarks\n\n![Benchmarks](./bench/bar1.svg)\n\nFor more tests and informations please see [Benchmarks](./bench/bench.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsokalski%2Fdelabella","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsokalski%2Fdelabella","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsokalski%2Fdelabella/lists"}