Geometry types for graphics programming
Dietrich Geisler, Irene Yoon, Aditi Kabra, Horace He, Yinnon Sanders, Adrian Sampson
Abstract
In domains that deal with physical space and geometry, programmers need to track the coordinate systems that underpin a computation. We identify a class of geometry bugs that arise from confusing which coordinate system a vector belongs to. These bugs are not ruled out by current languages for vector-oriented computing, are difficult to check for at run time, and can generate subtly incorrect output that can be hard to test for.
We introduce a type system and language that prevents geometry bugs by reflecting the coordinate system for each geometric object. A value's geometry type encodes its reference frame, the kind of geometric object (such as a point or a direction), and the computational representation (such as Cartesian or spherical coordinates). We show how these types can rule out geometrically incorrect operations, and we show how to use them to automatically generate correct-by-construction code to transform vectors between coordinate systems. We implement a language for graphics programming, Gator, that checks geometry types and compiles to OpenGL's shading language, GLSL. Using case studies, we demonstrate that Gator can raise the level of abstraction for shader programming and prevent common errors without inducing significant annotation overhead or performance cost.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext e1fac856-4047-487d-8bef-cb845736ac90Cited by top-tier papers1
Ask how each one uses itRelated papers
- Descend: A Safe GPU Systems Programming LanguageBastian Köpcke, Sergei Gorlatch, Michel SteuwerPLDI 2024 · 7 citations
- PHYSFRAME: type checking physical frames of reference for robotic systemsSayali Kate, Michael Chinn, Hongjun Choi, Xiangyu Zhang et al.FSE 2021 · 5 citations
- Metamorphic Shader Fusion for Testing Graphics Shader CompilersDongwei Xiao, Zhibo Liu, Shuai WangICSE 2023 · 12 citations
- RCGP: Resource Contracts for Graphics ProgrammingVenkataram Sivaram, Sai Praveen Bangaru, Ravi Ramamoorthi, Tzu-Mao Li et al.SIGGRAPH 2026
- An Investigation on Numerical Bugs in GPU Programs Towards Automated Bug DetectionRavishka Rathnasuriya, Nidhi Majoju, Zihe Song, Wei YangISSTA 2025
