This report describes version 3.1 of the Berkeley UNIGRAFIX scene description language and associated C language data structure and library, libug. The library provides support for reading and writing of scenes, calculating various properties (such as the bounding box of a definition), manipulating geometry and topology, and various other bookkeeping operations. Maintaining the language parser along with the other subroutines means that programs linking with the library will recognize the whole language. In particular, nested definitions and hierarchical references, which are difficult to implement correctly, are essentially free. All previously undocumented features of UNIGRAFIX 3.0 are documented, as well as the new features incorporated from the Soda Hall walkthrough project.