{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,23]],"date-time":"2026-03-23T23:09:14Z","timestamp":1774307354002,"version":"3.50.1"},"reference-count":19,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2020,11,13]],"date-time":"2020-11-13T00:00:00Z","timestamp":1605225600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"NSF","award":["1845952"],"award-info":[{"award-number":["1845952"]}]},{"name":"SRC"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2020,11,13]]},"abstract":"<jats:p>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.<\/jats:p>\n          <jats:p>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 coordinate 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.<\/jats:p>","DOI":"10.1145\/3428241","type":"journal-article","created":{"date-parts":[[2020,11,24]],"date-time":"2020-11-24T23:40:14Z","timestamp":1606261214000},"page":"1-25","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":5,"title":["Geometry types for graphics programming"],"prefix":"10.1145","volume":"4","author":[{"given":"Dietrich","family":"Geisler","sequence":"first","affiliation":[{"name":"Cornell University, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Irene","family":"Yoon","sequence":"additional","affiliation":[{"name":"University of Pennsylvania, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Aditi","family":"Kabra","sequence":"additional","affiliation":[{"name":"Carnegie Mellon University, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Horace","family":"He","sequence":"additional","affiliation":[{"name":"Cornell University, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Yinnon","family":"Sanders","sequence":"additional","affiliation":[{"name":"Cornell University, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Adrian","family":"Sampson","sequence":"additional","affiliation":[{"name":"Cornell University, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2020,11,13]]},"reference":[{"key":"e_1_2_2_1_1","volume-title":"Spark: Modular, Composable Shaders for Graphics Hardware. In SIGGRAPH.","author":"Foley Tim","year":"2011"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/301618.301665"},{"key":"e_1_2_2_3_1","volume-title":"Functional Programming for Compiling and Decompiling Computer-Aided Design. In ACM Conference on Programming Language Design and Implementation (PLDI).","author":"Fremont Daniel J."},{"key":"e_1_2_2_4_1","doi-asserted-by":"crossref","unstructured":"Pat Hanrahan and Jim Lawson. 1990. A Language for Shading and Lighting Calculations. In SIGGRAPH.  Pat Hanrahan and Jim Lawson. 1990. A Language for Shading and Lighting Calculations. In SIGGRAPH.","DOI":"10.1145\/97879.97911"},{"key":"e_1_2_2_5_1","unstructured":"Yong He Tim Foley and Kayvon Fatahalian. 2016. A System for Rapid Exploration of Shader Optimization Choices. In SIGGRAPH.  Yong He Tim Foley and Kayvon Fatahalian. 2016. A System for Rapid Exploration of Shader Optimization Choices. In SIGGRAPH."},{"key":"e_1_2_2_6_1","unstructured":"Dean Jackson and Jef Gilbert. 2015. WebGL Specification. https:\/\/www.khronos.org\/registry\/webgl\/specs\/latest\/1.0\/.  Dean Jackson and Jef Gilbert. 2015. WebGL Specification. https:\/\/www.khronos.org\/registry\/webgl\/specs\/latest\/1.0\/."},{"key":"e_1_2_2_7_1","volume-title":"Online Verification of Commutativity. In Workshop on Tools for Automatic Program Analysis (TAPAS).","author":"Kabra Aditi","year":"2020"},{"key":"e_1_2_2_8_1","volume-title":"Dimension Types. In European Symposium on Programming (ESOP).","author":"Kennedy Andrew J.","year":"1994"},{"key":"e_1_2_2_9_1","volume-title":"Relational Parametricity and Units of Measure. In ACM SIGPLAN\u015bSIGACT Symposium on Principles of Programming Languages (POPL).","author":"Kennedy Andrew J.","year":"1997"},{"key":"e_1_2_2_10_1","unstructured":"Microsoft. 2008. Direct3D. https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/hh309466(v=vs.85).aspx.  Microsoft. 2008. Direct3D. https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/hh309466(v=vs.85).aspx."},{"key":"e_1_2_2_11_1","volume-title":"Functional Programming for Compiling and Decompiling Computer-Aided Design. In ACM SIGPLAN International Conference on Functional Programming (ICFP).","author":"Nandi Chandrakana","year":"2018"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1111\/j.1467-8659.2010.01722.x"},{"key":"e_1_2_2_13_1","volume-title":"Illumination for Computer Generated Pictures. Commun. ACM 18, 6 (","author":"Phong Bui Tuong","year":"1975"},{"key":"e_1_2_2_14_1","unstructured":"Adrian Sampson. 2017. Let's Fix OpenGL. In Summit on Advances in Programming Languages (SNAPL).  Adrian Sampson. 2017. Let's Fix OpenGL. In Summit on Advances in Programming Languages (SNAPL)."},{"key":"e_1_2_2_15_1","volume-title":"Static Stages for Heterogeneous Programming. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA).","author":"Sampson Adrian","year":"2017"},{"key":"e_1_2_2_16_1","unstructured":"Donald J. Schuirmann. 200"},{"key":"e_1_2_2_17_1","unstructured":"Mark Segal and Kurt Akeley. 2017. The OpenGL 4.5 Graphics System: A Specification. https:\/\/www.opengl.org\/registry\/doc\/ glspec45.core.pdf.  Mark Segal and Kurt Akeley. 2017. The OpenGL 4.5 Graphics System: A Specification. https:\/\/www.opengl.org\/registry\/doc\/ glspec45.core.pdf."},{"key":"e_1_2_2_18_1","volume-title":"Naming Convention for Matrix Math. https:\/\/www.sebastiansylvan.com\/post\/matrix_naming_convention\/.","author":"Sylvan Sebastian","year":"2017"},{"key":"e_1_2_2_19_1","volume-title":"d.]. The OpenGL ES Shading Language (1.0 ed.)","author":"The Khronos Group Inc. [n."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428241","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3428241","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3428241","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T22:02:57Z","timestamp":1750197777000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428241"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,11,13]]},"references-count":19,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2020,11,13]]}},"alternative-id":["10.1145\/3428241"],"URL":"https:\/\/doi.org\/10.1145\/3428241","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2020,11,13]]},"assertion":[{"value":"2020-11-13","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}