{"id":22647906,"url":"https://github.com/juliageometry/earcut.jl","last_synced_at":"2025-04-19T03:21:32.720Z","repository":{"id":61797790,"uuid":"77153395","full_name":"JuliaGeometry/EarCut.jl","owner":"JuliaGeometry","description":"Wrapper for Mapbox's earcut.hpp for polygon triangulation","archived":false,"fork":false,"pushed_at":"2023-01-17T05:52:41.000Z","size":772,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T06:48:17.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","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/JuliaGeometry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-22T15:03:09.000Z","updated_at":"2021-10-10T03:57:52.000Z","dependencies_parsed_at":"2023-02-10T07:55:15.762Z","dependency_job_id":null,"html_url":"https://github.com/JuliaGeometry/EarCut.jl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaGeometry%2FEarCut.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaGeometry%2FEarCut.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaGeometry%2FEarCut.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaGeometry%2FEarCut.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaGeometry","download_url":"https://codeload.github.com/JuliaGeometry/EarCut.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249598577,"owners_count":21297465,"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-12-09T07:35:38.150Z","updated_at":"2025-04-19T03:21:32.701Z","avatar_url":"https://github.com/JuliaGeometry.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# EarCut\n\n[![Build Status](https://travis-ci.org/JuliaGeometry/EarCut.jl.svg?branch=master)](https://travis-ci.org/JuliaGeometry/EarCut.jl)\n[![Build status](https://ci.appveyor.com/api/projects/status/po0lqr5sg1wpdedj?svg=true)](https://ci.appveyor.com/project/SimonDanisch/earcut-jl)\n[![Coverage Status](https://coveralls.io/repos/JuliaGeometry/EarCut.jl/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/JuliaGeometry/EarCut.jl?branch=master)\n[![codecov.io](http://codecov.io/github/JuliaGeometry/EarCut.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGeometry/EarCut.jl?branch=master)\n\nWrapper for [earcut.hpp](https://github.com/mapbox/earcut.hpp), a header only library for triangulating polygons.\n\nLicense of wrapper: MIT\n\nLicense of earcut.hpp: [ISC](https://github.com/JuliaGeometry/EarCut.jl.git/deps/earcut/LICENSE)\n\nInstall with:\n```Julia\nPkg.add(\"EarCut\")\nPkg.test(\"EarCut\")\n```\n\nUsage:\n```Julia\nusing EarCut, GeometryBasics\na = Circle(Point2f0(0), 0.5f0)\nb = Circle(Point2f0(0), 1f0)\npolygon = [decompose(Point2f0, b), decompose(Point2f0, a)] # some points defining a polygon. Must be a Vector{Vector{Point}}\ntriangle_faces = triangulate(polygon)\n\n# then display with e.g. Makie like this:\nusing Makie, Colors\n\nv = vcat(polygon...)\nmsh = GeometryBasics.Mesh(v, triangle_faces)\n\nscene = Makie.mesh(v, triangle_faces; color = 1:length(v), shading = false, scale_plot = false, show_axis = false)\n```\n\nresulting in:\n\n![image](https://user-images.githubusercontent.com/32143268/79715814-78497d00-82f2-11ea-958c-51b757fad7a0.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliageometry%2Fearcut.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliageometry%2Fearcut.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliageometry%2Fearcut.jl/lists"}