{"id":50922177,"url":"https://github.com/fullscreen-triangle/lagrangian","last_synced_at":"2026-06-16T19:30:37.195Z","repository":{"id":351605652,"uuid":"1211671201","full_name":"fullscreen-triangle/lagrangian","owner":"fullscreen-triangle","description":"Shader Based Astronomy Through Serverless Shader Computing","archived":false,"fork":false,"pushed_at":"2026-05-09T01:06:23.000Z","size":10513,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T03:17:31.301Z","etag":null,"topics":["astronomy-astrophysics","astronomy-software","astrophysics","lunar-exploration","mars","solar-system"],"latest_commit_sha":null,"homepage":"https://space-observatory-xi.vercel.app","language":"TeX","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/fullscreen-triangle.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T16:20:12.000Z","updated_at":"2026-05-09T01:06:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fullscreen-triangle/lagrangian","commit_stats":null,"previous_names":["fullscreen-triangle/lagrangian"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fullscreen-triangle/lagrangian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullscreen-triangle%2Flagrangian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullscreen-triangle%2Flagrangian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullscreen-triangle%2Flagrangian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullscreen-triangle%2Flagrangian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fullscreen-triangle","download_url":"https://codeload.github.com/fullscreen-triangle/lagrangian/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullscreen-triangle%2Flagrangian/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34421324,"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-16T02:00:06.860Z","response_time":126,"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":["astronomy-astrophysics","astronomy-software","astrophysics","lunar-exploration","mars","solar-system"],"created_at":"2026-06-16T19:30:36.305Z","updated_at":"2026-06-16T19:30:37.185Z","avatar_url":"https://github.com/fullscreen-triangle.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eLagrangian\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\u003cem\u003eFundamental Station and Cosmic Observatory\u003c/em\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/img/Joseph_Louis_Lagrange2.jpg\" alt=\"Logo\" width=\"300\"/\u003e\n\u003c/p\u003e\n\nA framework in which **shaders are the instruments**. The GPU does not\nrender someone else's measurement; it performs the measurement. This\nrepository holds the mathematical framework, its reference\nimplementations, two papers that state the framework's claims, and a\nbrowser-native web app that lets a visitor's GPU execute the\ninstruments without ever contacting a server.\n\n---\n\n## 1. The thesis in one paragraph\n\nEvery SI unit reduces to a count of states, a ratio, or the circle\nconstant $\\pi$. Nothing in dimensional physics — including Newton's\ngravitational constant $G$ — is genuinely irreducible. A bounded\nphysical system has a state-count function $\\mathcal{M}(\\epsilon)$ that\ngrows combinatorially in the refinement depth $n$ according to\n$T(n, d) = d\\,(d+1)^{n-1}$, where $d$ is the state-space dimension.\nThree equivalent enumerative descriptions of a bounded oscillatory\nsystem — **oscillations, categories, partitions** — yield the same\nentropy $S = k_B\\,\\mathcal{M}\\,\\ln b$. A GPU fragment shader evaluating\na scalar field at its pixel coordinates performs, by construction, the\nsame numerical operation that a physical instrument performs when its\nobservables are integrals over conserved state fields. There is no\ndistinction between computing and observing at the level of what the\nmachine does. The framework takes the identity seriously and builds\nreal instruments on it.\n\n## 2. The load-bearing ideas\n\n### 2.1 Bounded phase space\nEvery persistent physical system occupies a bounded region of phase\nspace with finite Liouville measure. Finiteness implies Poincaré\nrecurrence, which implies oscillatory dynamics, which implies discrete\nmode structure. State counting is well-defined, and the count is finite.\n\n### 2.2 Triple equivalence\nA bounded system with $M$ degrees of freedom, each at refinement depth\n$n$, admits three equivalent descriptions with identical total entropy:\n\n| Description | Interpretation | Count |\n|---|---|---|\n| Oscillatory | Phases per cycle | $n^M$ |\n| Categorical | Distinguishable states | $n^M$ |\n| Partition | Hierarchical cells | $n^M$ |\n\nAll three collapse to $S = k_B M \\ln n$. The three are not analogies.\nThey are mathematically identical functions of the same underlying\nobject; the \"equivalence\" is a statement about three ways to count the\nsame thing.\n\n### 2.3 Partition coordinates\nIn a three-dimensional bounded space the partition coordinates are a\n4-tuple $(n, \\ell, m, s)$ — principal depth, angular complexity,\norientation, chirality — with shell capacity $C(n) = 2n^2$. These\ncarry the same structural role in this framework that quantum numbers\ncarry in standard quantum mechanics, but they are derived from the\naxiom rather than postulated.\n\n### 2.4 S-entropy coordinates\nThermodynamic state maps bijectively onto a dimensionless triple\n$(S_k, S_t, S_e) \\in [0, 1]^3$: kinetic, temporal, energy entropy\nnormalised onto the unit cube. This is the state a GPU texture stores\nper voxel.\n\n### 2.5 Composition inflation\nInteger compositions of $n$ in $d$ dimensions count distinguishable\noscillatory trajectories: $T(n, d) = d\\,(d+1)^{n-1}$. Angular\nresolution is $\\Delta\\theta = 2\\pi / T(n, d)$. Because $\\Delta\\theta$\nis dimensionless, the Planck-time bound on temporal intervals does not\napply. In $d = 3$, caesium-133 reaches sub-Planck-angular resolution\nafter $n_P = 56$ cycles — $6.1$ nanoseconds of integration time.\n\n### 2.6 The fundamental identity $\\mathcal{O} \\equiv \\mathcal{C} \\equiv \\mathcal{P}$\nObservation, computing, and processing are mathematically identical\noperations — each is categorical address resolution in partition space.\nThe distinction between them is the mechanism of refinement, not the\nresult. Photon-mediated refinement (observation), equation-mediated\nrefinement (computing), and constraint-mediated refinement\n(processing) all converge to the same address.\n\n### 2.7 Framework closure and $G$\nIf every SI unit reduces to counts + $\\pi$ + a reference period, then\n$G$ cannot remain exterior to the framework. Three independent routes\nto $G$ converge on a shared value with precision $(d+1)^{-n}$ at depth\n$n$; at $n = 8$ all three routes match CODATA 2018 within its stated\nuncertainty; at $n = 27$ they agree to double-precision machine\nepsilon. This is the framework's test case: either $G$ is computable\nthis way or the framework fails at the place it claims to be\nstrongest.\n\n## 3. What is in this repository\n\n```\n.\n├── README.md              (this file)\n├── Cargo.toml             workspace manifest for the Rust crates\n├── Makefile               common entry points\n├── LICENSE                MIT\n├── docs/sources/          the theoretical corpus (.tex sources)\n├── publication/           two standalone papers + Python + Rust + figures\n│   ├── shader-based-astronomy/\n│   └── universal-partition-depth-observatory/\n└── web/                   browser-native Next.js app (the observatory site)\n```\n\n### 3.1 The papers\nTwo publishable, self-contained papers live under `publication/`:\n\n- **[Shader-Based Astronomy](publication/shader-based-astronomy/shader-based-astronomy.tex)**\n  — establishes that a GPU fragment shader pipeline computes\n  astronomical observables (Rayleigh and Mie scattering, refractive\n  delay, orbital mechanics, positioning) to the numerical precision of\n  the underlying quadrature. 10/10 benchmarks pass, median relative\n  error 6.9 × 10⁻⁵.\n\n- **[Dimensionless Reduction of the Gravitational Constant](publication/universal-partition-depth-observatory/universal-partition-depth-observatory.tex)**\n  — derives $G$ via three independent routes from bounded-phase-space\n  partition structure, establishes the $(d+1)^{-n}$ precision scaling,\n  proposes experimental tests, and derives cosmological corollaries\n  (MOND's $a_0 \\approx c H_0 / 2\\pi$, dark-energy $w_{\\text{eff}} = -0.75$,\n  $\\dot G/G$ of order $10^{-11}$ yr$^{-1}$). 43/43 benchmarks pass.\n\n- **[Harmonic-Scattering Loop Coupling](publication/harmonic-scattering-loop-coupling/harmonic-scattering-loop-coupling-map.tex)**\n  — builds a transfer-matrix framework for resolving multiple independent\n  sources through a single looped optical path in a polyatomic molecular\n  resonator. Proves the transfer-matrix rank equals the cycle rank $C$ of\n  the molecular harmonic graph plus one; derives the dephasing-bounded\n  capacity $N_{\\max} = (C+1)\\,T_{\\mathrm{deph}}/T_L$. Machine-precision\n  reconstruction through a benzene-like resonator, within-class Spearman\n  $\\rho_s = +0.96$ for the $\\mu$--$n_r$ relation across seven H-bonding\n  liquids, sub-quadratic scaling $\\kappa \\propto C^{1.25}$ up to $C=10$.\n  18/18 benchmarks pass.\n\nEach paper ships with:\n- a CPU Python reference in `python/` for prototyping and validation,\n- a Rust crate in `rust/` for the production implementation,\n- JSON and CSV validation outputs in `output/`,\n- publication-quality figure panels in `figures/`.\n\n### 3.2 The Python references\nThese are the scientific ground truth. They are intentionally plain\nand slow — every formula in the papers appears unadorned in the\nsource, as close to the prose as NumPy / mpmath allow. Both packages\nexpose a CLI that runs the paper's validation suite and writes JSON +\nCSV outputs:\n\n```bash\ncd publication/shader-based-astronomy/python\nPYTHONPATH=src python -m shader_astronomy.cli --output-dir ../output\n\ncd publication/universal-partition-depth-observatory/python\nPYTHONPATH=src python -m gthree.cli --output-dir ../output\n```\n\nNon-zero exit if any benchmark fails. These runs are the scientific\nacceptance criterion for every subsequent implementation.\n\n### 3.3 The Rust crates\nGPU implementations live in `publication/*/rust/`. They share WGSL\nshader source (currently `shader-based-astronomy/rust/src/shaders/`,\nwith the G observatory's crate to follow). The Rust path compiles both\nto native (desktop / server) and, with the `wgpu` backend, to WebGPU\nin the browser. One shader codebase, two delivery surfaces.\n\n### 3.4 The web app\n`web/` is a Next.js 13 + Tailwind + Framer Motion app configured for\nfull static export. There is no backend. The `out/` bundle after\n`npm run build` is pure HTML + JavaScript + WGSL + binary assets,\nhostable on any CDN. Every observable displayed on the site is\ncomputed in the visitor's GPU from shaders the visitor's browser\nfetched once.\n\nPages:\n- `/` — landing, with a rotating Jupiter model\n- `/instruments/` — instrument hub (atmosphere live; G routes, spectrometer, mass spec pending)\n- `/instruments/atmosphere/` — the five-pass atmospheric pipeline in WebGPU\n- `/documentation/` — paper cards linking to PDFs\n- `/about/` — framework posture, attribution\n\n## 4. How to run things\n\n### 4.1 Python validation (fast, no install beyond `pip install numpy mpmath scipy`)\n\n```bash\nmake validate\n```\n\nor directly:\n\n```bash\ncd publication/shader-based-astronomy/python\nPYTHONPATH=src python -m shader_astronomy.cli\ncd ../../universal-partition-depth-observatory/python\nPYTHONPATH=src python -m gthree.cli\n```\n\nExpected outcome: **10/10 pass** and **43/43 pass** respectively, with\nJSON + CSV written to each paper's `output/` directory.\n\n### 4.2 Figure regeneration\n\n```bash\nmake figures\n```\n\nWrites PNG panels into each paper's `figures/` directory. Each panel\nis a 1 × 4 layout with at least one 3D chart; all data is generated\nfrom the actual validation modules.\n\n### 4.3 Rust crates\n\n```bash\ncargo build --release\ncargo test --release\n```\n\nThe workspace `Cargo.toml` at the root links to the crates under\n`publication/`. Individual crates are buildable from their own\ndirectories too.\n\n### 4.4 Web app (development)\n\n```bash\ncd web\nnpm install\nnpm run dev          # http://localhost:3000\n```\n\n### 4.5 Web app (production static export)\n\n```bash\ncd web\nnpm run build        # writes web/out/ — deployable static bundle\n```\n\nNo server component. Drop `web/out/` on any CDN (Cloudflare Pages,\nNetlify, Vercel, S3 + CloudFront, GitHub Pages, anywhere that serves\nstatic files).\n\n## 5. Validation posture\n\nEvery numerical claim in either paper is reproduced by an automated\nbenchmark in the Python reference. The benchmarks write JSON and CSV\nso that claims can be checked without re-running the code. Any\ndeviation — a route that drifts from CODATA, a benchmark that slips\noutside tolerance, a shader whose output disagrees with the CPU\nreference — is a regression and shows up as a failing test.\n\nSnapshot at time of writing:\n\n| Paper | Benchmarks | Pass rate | Max rel. error |\n|---|---|---|---|\n| Shader-Based Astronomy | 10 | 10 / 10 | 4.3 × 10⁻³ |\n| Dimensionless $G$ | 43 | 43 / 43 | within bound $(d+1)^{-n}$ |\n| Harmonic-Scattering Loop Coupling | 18 | 18 / 18 | within $\\kappa\\sigma$ bound |\n\n## 6. Status\n\n### Working today\n- Both papers are complete and buildable (`pdflatex` + `bibtex`).\n- Both Python references run end-to-end and emit archival JSON + CSV.\n- Both papers' figure panels regenerate from actual data.\n- The web app builds as a static site (7 routes, 119 KB shared JS).\n- The atmosphere instrument page initialises WebGPU, fetches the five\n  WGSL shaders, compiles shader modules, surfaces precise errors.\n\n### In progress\n- The full per-frame dispatch loop for the atmosphere instrument\n  (texture allocation, bind groups, encode/submit per pass).\n- The pre-computed bootstrap textures (terrain partition, material\n  S-entropy) the atmosphere instrument reads.\n- A shader-sync pre-build step so `web/public/shaders/` always\n  mirrors the canonical source in `publication/shader-based-astronomy/rust/src/shaders/`.\n- The Rust crate for the G observatory (parallel to\n  `publication/shader-based-astronomy/rust/`).\n\n### Further out\n- G-routes instrument (live three-route G computation in the browser)\n- Spectrometer instrument (hardware-oscillator spectroscopy demo)\n- Mass-spec instrument (force-free partition-depth minimisation demo)\n- Python bindings for the Rust crates via PyO3, so lab software can\n  call the framework without leaving Python\n\n## 7. Attribution\n\nFramework, software, and papers: Kundai Farai Sachikonye\n(`kundai.sachikonye@bitspark.com`).\n\nThe theoretical corpus under `docs/sources/` is also authored by\nKundai; the published papers under `publication/` are deliberately\nself-contained and do not cite the corpus, so each paper stands on\nits own derivations.\n\nThe Jupiter GLB on the landing page is under its own licence (placed\nby Kundai). The Next.js chassis under `web/` started from a\nCodeBucks-licensed portfolio template; all portfolio content has\nbeen replaced with observatory content.\n\n## 8. Licence\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullscreen-triangle%2Flagrangian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffullscreen-triangle%2Flagrangian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullscreen-triangle%2Flagrangian/lists"}