{"id":27329441,"url":"https://github.com/csirmaz/hypergeometry","last_synced_at":"2026-05-17T00:04:39.109Z","repository":{"id":177078284,"uuid":"655447628","full_name":"csirmaz/hypergeometry","owner":"csirmaz","description":"Geometric tools for an arbitrary number of dimensions","archived":false,"fork":false,"pushed_at":"2023-10-02T23:12:28.000Z","size":299,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-03T02:40:49.922Z","etag":null,"topics":["4d","cgi","geometry","numpy","python","raytracing"],"latest_commit_sha":null,"homepage":"","language":"Python","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/csirmaz.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}},"created_at":"2023-06-18T23:10:45.000Z","updated_at":"2023-09-09T01:23:47.000Z","dependencies_parsed_at":"2023-12-22T13:20:13.035Z","dependency_job_id":"15670b26-aa10-491e-8e0f-475bfe092f3b","html_url":"https://github.com/csirmaz/hypergeometry","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":"0.014285714285714235","last_synced_commit":"bc823541d44aefc7f41df5f543f27fcc07de5329"},"previous_names":["csirmaz/hypergeometry"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/csirmaz/hypergeometry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2Fhypergeometry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2Fhypergeometry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2Fhypergeometry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2Fhypergeometry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csirmaz","download_url":"https://codeload.github.com/csirmaz/hypergeometry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csirmaz%2Fhypergeometry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010329,"owners_count":26084737,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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":["4d","cgi","geometry","numpy","python","raytracing"],"created_at":"2025-04-12T12:33:17.576Z","updated_at":"2025-10-12T05:48:57.138Z","avatar_url":"https://github.com/csirmaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Hypergeometry\n\nA Python library to do geometric manipulations of arbitrarily-many-dimensional points and vectors,\nand CGI tools to render a 4D scene as a 2D image.\n\n## Quickstart\n\n`main.py` contains the definition of a simple 4D scene and code to render it\ninto a 2D image.\n\n## Classes and object types\n\n### Point\n\n`Point(list[float])` - A point or vector\n\n### Poly\n\n`Poly(list[list[float]])` - A collection of points or vectors\n\n### Span\n\n`Span(org:Point, basis:Poly)` - A `basis` or frame of vectors anchored at a specific point (`org`) in space.\nCan represent a subspace, or (via subclasses) a parallelotope or a simplex.\n\n### Body(Span)\n\n`Body(org:Point, basis:Poly)` - A subclass of Span. \nContains operations common to simplices and parallelotopes.\n\n### Simplex(Body)\n\n`Simplex(org:Point, basis:Poly)` - A subclass of Body.\nAn n-dimensional simplex (generalization of the triangle and the tetrahedron) \nwhich is the collection of points around `org` along the vectors in `basis` with positive\ncoefficients whose sum it at most 1.\n\n### Parallelotope(Body)\n\n`Parallelotope(org:Point, basis:Poly)` - A subclass of Body.\nAn n-dimensional parallelotope (generalization of the parallelogram and the parallelepiped)\nwhich is the collection of points around `org` along the vectors in `basis` with coefficients between 0 and 1.\n\n### ObjectFace\n\n```python\nObjectFace(\n    body: Simplex,\n    normal: Point,\n    color: (R,G,B),\n    surface: str\n)\n```\nObjectFace objects are the building blocks of our scenery.\nWe work with triangular (simplex) faces that are one dimension lower than the dimension of the scene,\nso in a 4D scene, we work with 3D faces covering the surfaces of the 4D objects. \nThe faces also need to be oriented, so we store their normal vector, as well as their\ncolor, and the type of their surface that determines the calculation used for lighting effects\n(e.g. matte, translucent, etc.)\n\n### Camera\n\n`Camera(space:Span, focd:float)` - Defines a camera.\nA camera is defined by a Span spanning the whole space with an orthonormal basis.\nThe first D-1 vectors form the image pane, while the focal point is\n`focd` (focal distance) away along the last vector.\n\n### Light\n\n`Light(p:Point)` - Defines a point light.\n\n### Renderer\n\n```python\nRenderer(\n    objects: list[ObjectFace],\n    cameras: list[Camera],  # one for each dimension reduction\n    lights: list[Light],\n    img_range: float,  # the maximum 2D coordinate in the 2D image\n    img_step: float  # the resolution of the 2D image\n)\n```\nGroups objects, cameras and lights and contains logic to render a 4D scene\ninto a 2D image.\n\n## More info\n\nPlease read detailed explanations and background info in the wiki at\nhttps://github.com/csirmaz/hypergeometry/wiki\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsirmaz%2Fhypergeometry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsirmaz%2Fhypergeometry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsirmaz%2Fhypergeometry/lists"}