{"id":13426161,"url":"https://github.com/mapbox/martini","last_synced_at":"2025-03-15T21:30:44.159Z","repository":{"id":41158236,"uuid":"202365235","full_name":"mapbox/martini","owner":"mapbox","description":"A JavaScript library for real-time RTIN terrain mesh generation","archived":false,"fork":false,"pushed_at":"2022-10-28T14:44:31.000Z","size":1372,"stargazers_count":614,"open_issues_count":8,"forks_count":41,"subscribers_count":109,"default_branch":"main","last_synced_at":"2025-01-08T21:43:35.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://observablehq.com/@mourner/martin-real-time-rtin-terrain-mesh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapbox.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}},"created_at":"2019-08-14T14:18:19.000Z","updated_at":"2024-12-12T07:11:40.000Z","dependencies_parsed_at":"2022-09-01T13:22:48.067Z","dependency_job_id":null,"html_url":"https://github.com/mapbox/martini","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmartini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmartini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmartini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmartini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapbox","download_url":"https://codeload.github.com/mapbox/martini/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243792285,"owners_count":20348607,"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-07-31T00:01:27.750Z","updated_at":"2025-03-15T21:30:43.722Z","avatar_url":"https://github.com/mapbox.png","language":"JavaScript","readme":"# MARTINI\n\n[![Build Status](https://travis-ci.com/mapbox/martini.svg?branch=main)](https://travis-ci.com/mapbox/martini) [![Simply Awesome](https://img.shields.io/badge/simply-awesome-brightgreen.svg)](https://github.com/mourner/projects)\n\nMARTINI stands for **Mapbox's Awesome Right-Triangulated Irregular Networks, Improved**.\n\nIt's an experimental JavaScript library for **real-time terrain mesh generation** from height data. Given a (2\u003csup\u003ek\u003c/sup\u003e+1) × (2\u003csup\u003ek\u003c/sup\u003e+1) terrain grid, it generates a hierarchy of triangular meshes of varying level of detail in milliseconds. _A work in progress._\n\nSee the algorithm in action and read more about how it works in [this interactive Observable notebook](https://observablehq.com/@mourner/martin-real-time-rtin-terrain-mesh).\n\nBased on the paper [\"Right-Triangulated Irregular Networks\" by Will Evans et. al. (1997)](https://www.cs.ubc.ca/~will/papers/rtin.pdf).\n\n![MARTINI terrain demo](martini.gif)\n\n## Example\n\n```js\n// set up mesh generator for a certain 2^k+1 grid size\nconst martini = new Martini(257);\n\n// generate RTIN hierarchy from terrain data (an array of size^2 length)\nconst tile = martini.createTile(terrain);\n\n// get a mesh (vertices and triangles indices) for a 10m error\nconst mesh = tile.getMesh(10);\n```\n\n## Install\n\n```bash\nnpm install @mapbox/martini\n```\n\n### Ports to other languages\n\n- [pymartini](https://github.com/kylebarron/pymartini) (Python)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fmartini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapbox%2Fmartini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fmartini/lists"}