{"id":24737477,"url":"https://github.com/engineersbox/quadtrees","last_synced_at":"2026-07-13T23:31:46.961Z","repository":{"id":109327681,"uuid":"222203170","full_name":"EngineersBox/QuadTrees","owner":"EngineersBox","description":"JavaScript + p5.js implementation of the quadtree point decomposition algorithm","archived":false,"fork":false,"pushed_at":"2019-11-17T13:23:49.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T17:44:52.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EngineersBox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-11-17T05:45:05.000Z","updated_at":"2019-11-17T13:23:51.000Z","dependencies_parsed_at":"2023-03-26T16:19:09.010Z","dependency_job_id":null,"html_url":"https://github.com/EngineersBox/QuadTrees","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EngineersBox/QuadTrees","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FQuadTrees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FQuadTrees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FQuadTrees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FQuadTrees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EngineersBox","download_url":"https://codeload.github.com/EngineersBox/QuadTrees/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineersBox%2FQuadTrees/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35440511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"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":[],"created_at":"2025-01-27T22:08:29.956Z","updated_at":"2026-07-13T23:31:46.956Z","avatar_url":"https://github.com/EngineersBox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuadTrees\n\nQuadTrees are a 2D point decomposition algorithm, essentially grouping points into \"boxes\". Each box has a center point and a radius, both of which define an amount of space the box is responsible for.\n\nIt also has a capacity, a maximum amount of points it can hold before it has to split into 4 subdivisions, each of which are a box in and of themselves.\n\nHere is an example of a QuadTree with box capacity 1:\n![QuadTree Example](https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Point_quadtree.svg/1024px-Point_quadtree.svg.png)\n\nQuadTrees allow fast classification of points and speed up algorithms that require localised point querying, such as object interactions. \n\nAnother use is for image compression, in this case the points are colour values. Each box would contain a threshold for which a colour and deviate and still remain classified inside that box. Anything outside of this deviation would cause it to subdivide.\n\nHere is an example of image compression with QuadTrees:\n![Image Compression Example](https://upload.wikimedia.org/wikipedia/commons/d/d7/Quadtree_compression_of_an_image.gif)\n\nThere is a 3D version of QuadTrees, called OctTrees that have the same idea but for 3 dimensions.\n\n[Wikipedia article](https://en.wikipedia.org/wiki/Quadtree)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineersbox%2Fquadtrees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineersbox%2Fquadtrees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineersbox%2Fquadtrees/lists"}