{"id":19312483,"url":"https://github.com/exaexa/hilbert-curve-o1","last_synced_at":"2026-06-13T13:33:27.552Z","repository":{"id":149763792,"uuid":"401261247","full_name":"exaexa/hilbert-curve-o1","owner":"exaexa","description":"Constant-time integer transform to 2D Hilbert curve","archived":false,"fork":false,"pushed_at":"2021-08-30T08:17:11.000Z","size":1,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T03:45:40.230Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exaexa.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":"2021-08-30T07:54:30.000Z","updated_at":"2022-11-22T19:19:19.000Z","dependencies_parsed_at":"2023-04-25T17:32:50.618Z","dependency_job_id":null,"html_url":"https://github.com/exaexa/hilbert-curve-o1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/exaexa/hilbert-curve-o1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exaexa%2Fhilbert-curve-o1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exaexa%2Fhilbert-curve-o1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exaexa%2Fhilbert-curve-o1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exaexa%2Fhilbert-curve-o1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exaexa","download_url":"https://codeload.github.com/exaexa/hilbert-curve-o1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exaexa%2Fhilbert-curve-o1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34286975,"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-06-13T02:00:06.617Z","response_time":62,"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":"2024-11-10T00:34:58.042Z","updated_at":"2026-06-13T13:33:27.534Z","avatar_url":"https://github.com/exaexa.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Const-time Hilbert curve with integer operations\n\nThe code in `intbert.c` computes the position of *n*-th \"node\" of the 2D Hilbert\ncurve in *O(1)* time, using only bitwise integer operation.\n\nThe method is loosely based on transforming the U-curve (aka Gray code) with\nconsecutive accumulated rotations and flips, then deinterleaving (as in Morton\nZ-curve).\n\nTo run a demo (order 14 curve):\n```sh\nmake intbert\n./intbert 14 \u003e hilbert14.tsv\n```\n\nTo plot the results (here using `R`):\n```r\nd \u003c- read.table('hilbert14.tsv')[,3:4]\n\n# plot interactively\nplot(d, pch=20, cex=.5, col=rainbow(2^14))\nlines(d)\n\n# plot to SVG\nsvg('hilbert14.svg', 20, 20)\nplot(d, type='l', lwd=2, xlab='', ylab='')\npoints(d, pch=20, col=rainbow(2^14))\ndev.off()\n```\n\n**TODOs:**\n\n- reverse transform (2D coords to 1D Hilbert)\n- optimized versions (x86 asm, shaders, lower-than-64bit versions, ...)\n\n## License\n\nPublic domain.\n\n(But I'll be happy if you link back to this repo.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexaexa%2Fhilbert-curve-o1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexaexa%2Fhilbert-curve-o1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexaexa%2Fhilbert-curve-o1/lists"}