{"id":17625393,"url":"https://github.com/cben/huppoid","last_synced_at":"2025-08-28T09:06:23.524Z","repository":{"id":90929464,"uuid":"47576520","full_name":"cben/huppoid","owner":"cben","description":"Retroactive: Code from our wedding invitation (2009)","archived":false,"fork":false,"pushed_at":"2015-12-09T13:02:00.000Z","size":1697,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"gh-pages","last_synced_at":"2025-08-28T08:32:49.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cben.github.io/huppoid/huppa.html","language":"Python","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/cben.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}},"created_at":"2015-12-07T20:11:28.000Z","updated_at":"2015-12-08T12:19:53.000Z","dependencies_parsed_at":"2023-03-22T00:04:20.758Z","dependency_job_id":null,"html_url":"https://github.com/cben/huppoid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cben/huppoid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cben%2Fhuppoid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cben%2Fhuppoid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cben%2Fhuppoid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cben%2Fhuppoid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cben","download_url":"https://codeload.github.com/cben/huppoid/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cben%2Fhuppoid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272474969,"owners_count":24940656,"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-08-28T02:00:10.768Z","response_time":74,"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-10-22T22:42:28.847Z","updated_at":"2025-08-28T09:06:23.492Z","avatar_url":"https://github.com/cben.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Retroactive: Code from our wedding invitation (2009)\n\nWe ([@anpc](https://github.com/anpc) \u0026 [@cben](https://github.com/cben)) wanted something geeky and XKCD-ish for our wedding invitation and came up with a [Huppa](https://en.wikipedia.org/wiki/Huppa) extended in the 4th dimension, or a 4-dimensional [Cubiod](https://en.wikipedia.org/wiki/Cuboid) with frills:\n\n![Huppoid image](canvas.png)\n\nYes, we're strange :-)\nThe invitation details page (originally at bit.ly/huppoid -\u003e sourceforge) included code to render it from different points of view.\nI don't think anybody cares, but I wanted to release \u0026 preserve it...\n\nI failed to find a good-looking direct 4D-\u003e2D projection so did a 4D-\u003e3D (resulting in cube-within-a-cube) followed by 3D-\u003e2D from *a different point*.  Apparently that's a well known way to visualize 4D — [Schlegel diagram](https://en.wikipedia.org/wiki/Schlegel_diagram).\n\nThe original 2009 version can be seen at https://rawgit.com/cben/huppoid/a6f4f499066606a427637b57b7cb0e4daa8c7ae4/output/huppa.html.\nIt was compiled to JavaScript with Pyjamas, now known as [Pyjs](http://pyjs.org/) and drew on a CANVAS tag.\na6f4f499066606a427637b57b7cb0e4daa8c7ae4 contains the latest source I found but I failed to find a Pyjamas version that will compile it correctly...\n\nAs Pyjs does browser sniffing and requires compilation, I figured [Brython](http://brython.info) which interprets Python 3 in-browser would be a better archival format.\n\n\u003e **=\u003e https://cben.github.io/huppoid/huppa.html**\n\nAlas Brython turned out waaay slower than the 2009 version (even with Moore's law?!), but oh well.\n(If I were to write it now, I'd have used something with 1:1 translation to JS such as Coffeescript or Rapydscript, or just raw JS.  And WebGL.)\n\nI also found the z-order (aka painter's algorithm) was very lacking — it always drew all lines, then the fat points and the stick figures image last on top.\nI somewhat improved the sorting but there are still some buggy angles, e.g. https://cben.github.io/huppoid/huppa.html#-5.0,3.0,4.0,5.0 .\nI'm not sure it's even possible always find a correct drawing order without splitting objects or *per-pixel* z-buffer...\n\n## Debugging\n\n- `huppa.py` is loaded via XHR which may not work from a `file://` local checkout, a web server is needed.\n- Prints \u0026 exceptions go to JS console.\n- Accessing Brython from JS console is hard (`__BRYTHON__.builtins.getattr(__BRYTHON__.globals().main, 'draw')`...).\n  Instead, add `?debug=` to get a very simple in-page *Python* console (type, press Enter, see JS console for history).\n  See also http://brython.info/static_doc/en/test.html.\n- Add `?clearpage=` to remove the static images \u0026 text - helps with screenshotting/cross-browser testing tools.\n\n## Attribution \u0026 License\n\nStick figures were shamelessly stolen from https://xkcd.com/489, formal attire from https://xkcd.com/422.\n(Hint: XKCD scales up really well by [tracing with Inkscape](http://www.inkscape.org/doc/tracing/tutorial-tracing.html).)\n\nThe final invitation hazmana.jpg, hazmana2.jpg were designed by Vlad Kaminsky; I probably can license them as I see fit but not formally sure.\n\n[CC0](http://creativecommons.org/publicdomain/zero/1.0/): I place *everything else here* under public domain / waive all rights to the extent possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcben%2Fhuppoid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcben%2Fhuppoid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcben%2Fhuppoid/lists"}