Software Open Access

Geometry Types for Graphics Programming Artifact

Dietrich Geisler; Irene Yoon; Aditi Kabra; Horace He; Yinnon Sanders; Adrian Sampson

Dublin Core Export

<?xml version='1.0' encoding='utf-8'?>
<oai_dc:dc xmlns:dc="" xmlns:oai_dc="" xmlns:xsi="" xsi:schemaLocation="">
  <dc:creator>Dietrich Geisler</dc:creator>
  <dc:creator>Irene Yoon</dc:creator>
  <dc:creator>Aditi Kabra</dc:creator>
  <dc:creator>Horace He</dc:creator>
  <dc:creator>Yinnon Sanders</dc:creator>
  <dc:creator>Adrian Sampson</dc:creator>
  <dc:description>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.</dc:description>
  <dc:subject>Programming Language Design</dc:subject>
  <dc:title>Geometry Types for Graphics Programming Artifact</dc:title>
All versions This version
Views 4747
Downloads 00
Data volume 0 Bytes0 Bytes
Unique views 4646
Unique downloads 00


Cite as