mesh_opt: Combining Positions and Normals

Nehab, D. 2006--.


Abstract: Range scanning, manual 3D editing, and other modeling approaches can provide information about the geometry of surfaces in the form of either 3D positions (e.g., triangle meshes or range images) or orientations (normal maps or bump maps). This software implements an algorithm that combines these two kinds of estimates to produce a new surface that approximates both. Our formulation is linear, allowing it to operate efficiently on complex meshes commonly used in graphics. It also treats high- and low-frequency components separately, allowing it to optimally combine outputs from data sources such as stereo triangulation and photometric stereo, which have different error-vs.-frequency characteristics. Therefore, the algorithm is capable of both recovering high-frequency details and avoiding low-frequency bias, producing surfaces that are more widely applicable than position or orientation data alone.

Network support for the Lua language

Nehab, D. 1999--.


Abstract: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet.
The core support has been implemented so that it is both efficient and simple to use. The core can be used by any Lua application once it has been properly initialized by the interpreter running the Lua application. The code has been tested and runs well on several Windows and Unix platforms.

ANSI C Library for PLY file format input and output

Nehab, D. 2003--.


Abstract: RPly is a library that lets applications read and write PLY links. The PLY file format is widely used to store geometric information, such as 3D models, but is general enough to be useful for other purposes. There are other libraries out there, of course, but I decided to write my own. I tried to write it in such a way that in other incarnations I won't have to do it again. Everything that made me unhappy about the existing libraries was eliminated from RPly.
RPly is easy to use, well documented, small, free, open-source, ANSI C, efficient, well tested and I will keep supporting it for a while

Filters, sources and sinks: design, motivation and examples

(or Functional programming for the rest of us)
Nehab, D. 2004.
Lua Technical Note 012, LTN012
also published in Lua Gems


Abstract: Certain operations can be implemented in the form of filters. A filter is a function that processes data received in consecutive function calls, returning partial results chunk by chunk. Examples of operations that can be implemented as filters include the end-of-line normalization for text, Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing, and there are many others. Filters become even more powerful when we allow them to be chained together to create composite filters. Filters can be seen as middle nodes in a chain of data transformations. Sources an sinks are the corresponding end points of these chains. A source is a function that produces data, chunk by chunk, and a sink is a function that takes data, chunk by chunk. In this technical note, we define an elegant interface for filters, sources, sinks and chaining. We evolve our interface progressively, until we reach a high degree of generality. We discuss difficulties that arise during the implementation of this interface and we provide solutions and examples.

Using Finalized Exceptions

(or How to get rid of all those if statements)
Nehab, D. 2004.
Lua Technical Note 013, LTN013


Abstract: This little LTN describes a simple exception scheme that greatly simplifies error checking in Lua programs. All the needed functionality ships standard with Lua, but is hidden between the assert and pcall functions. To make it more evident, we stick to a convenient standard (you probably already use anyways) for Lua function return values, and define two very simple helper functions (either in C or in Lua itself).