{"id":18985385,"url":"https://github.com/traunin/triangulation","last_synced_at":"2026-02-14T20:04:26.353Z","repository":{"id":259725910,"uuid":"879078653","full_name":"Traunin/triangulation","owner":"Traunin","description":"A Java triangulation library","archived":false,"fork":false,"pushed_at":"2024-12-29T13:10:41.000Z","size":508,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-06T02:42:08.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/Traunin.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-26T23:00:21.000Z","updated_at":"2024-12-29T12:40:34.000Z","dependencies_parsed_at":"2024-10-27T16:28:33.537Z","dependency_job_id":"9aec647e-0993-409f-a418-212ddc0b1090","html_url":"https://github.com/Traunin/triangulation","commit_stats":null,"previous_names":["traunin/triangulation"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Traunin/triangulation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Traunin%2Ftriangulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Traunin%2Ftriangulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Traunin%2Ftriangulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Traunin%2Ftriangulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Traunin","download_url":"https://codeload.github.com/Traunin/triangulation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Traunin%2Ftriangulation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29454742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-08T16:26:16.046Z","updated_at":"2026-02-14T20:04:26.336Z","avatar_url":"https://github.com/Traunin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Triangulation\n\nThis is the library used for polygon triangulation. Can be used for polygon rasterization by splitting them into triangles. If a polygon is in 3d space, it has to be rotated parallel to one of coordinate planes.\n\n## Installation\n\n### Using Maven Central Repository\n\nhttps://central.sonatype.com/artifact/io.github.traunin/triangulation\n\nMaven example for `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.traunin\u003c/groupId\u003e\n  \u003cartifactId\u003etriangulation\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nGradle (Kotlin) example for `build.gradle.kts`:\n\n```kts\nimplementation(\"io.github.traunin:triangulation:1.1.0\")\n```\n\n\nIf you don't want to build the library yourself, you can download the jar file from the releases tab.\n\n### Building\n\nClone the repository:\n\n```sh\ngit clone https://github.com/traunin/triangulation\n```\n\nOr download the code manually and extract it in the current folder.\n\nGo into the folder:\n\n```sh\ncd triangulation\n```\n\nRun:\n\n```sh\n.\\gradlew build\n```\n\nThe jar file is generated in /lib/build/libs/.\n\n\n## Importing\n\n### Gradle\n\nIn the `app` directory create the `lib` folder (or name as you wish) at the same level as the build file and the `src` folder. Place the jar file in that directory.\n\nThen, modify the corresponding build file:\n\n`build.gradle`:\n\n```groovy\ndependencies {\n    # other dependencies above\n    implementation files('lib/triangulation-1.1.0.jar')\n}\n```\n\n`build.gradle.kts`:\n\n```kts\ndependencies {\n    // other dependencies above\n    implementation(files(\"lib/triangulation-1.1.0.jar\"))\n}\n```\n\nAnd rebuild the project. The package should be available for import.\n\n## Usage\n\n```java\n// implement Vector2f interface in your vector\nList\u003cVector2f\u003e vertices = Arrays.asList(\n    new Vector2f(0, 0),\n    new Vector2f(1, 0),\n    new Vector2f(1, 1),\n    new Vector2f(0, 1)\n);\nList\u003cInteger\u003e vertexIndices = Arrays.asList(0, 1, 2, 3)\n// ear clipping triangulation, suitable for concave polygons\nList\u003cint[]\u003e triangles = Triangulation.earClippingTriangulate(vertices, vertexIndices)\n// convex polygon triangulation, produces a fan triangulation\nList\u003cint[]\u003e triangles = Triangulation.convexPolygonTriangulate(vertices, vertexIndices)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraunin%2Ftriangulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraunin%2Ftriangulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraunin%2Ftriangulation/lists"}