Downloads

Simple Mesh Viewer

SMV is a simple mesh viewer of OpenMesh 1.0 meshes using OpenGL for rendering. It is intended as a simple bolt-on setup for C++ programmers working on experimental projects where you don't really care about mesh rendering but still need a display.

Features:

SMV includes a simple example viewer using GLUT for window management. Makefiles for Linux and OS X and an XCode 2.0 project are provided to get you started. Code documentation is included.

SMV is intended for C++ programmers: download the current source.

Weighted Voronoi Stippling

You can download the application that I made for my Weighted Voronoi Stippling paper. It's definitely research code, so there are some menu options that don't do anything obvious. However, I've included some simple instructions that will let you easily create stipple drawings from your own images.

This code also has improvements since I wrote the original paper. In particular, I now dynamically adjust the size of the stipples to better represent the tone of the input image. There's more information about this in my MSc thesis.

You can see a list of changes.

Mac OS X

The current version runs on Leopard (10.5). There is an older version that ran on (at least) 10.4.2.

  1. Download Voronoi OS X Oct 16 2008.dmg for Leopard or the older Voronoi_OS_X_Sept_20_2005.dmg for Tiger.
  2. If the DMG file doesn't open automatically, double-click the file to mount the disk image.
  3. Optionally copy VoronoiStippler to somewhere convenient (/Applications or ~/Applications is normal)
  4. Double-click VoronoiStippler to run it.

Windows

This should run on Windows XP/NT/2000/etc.

WARNING: Most likely this will *not* work with the most currently-available version of ImageMagick—I have received reports that it fails to run with an "Entry Point Not Found" error. The explanation is that the ImageMagick people have changed their ABI so that it no longer matches what I compiled against. At some point I would like to recompile this against a static version of ImageMagick (or remove the ImageMagick library entirely). Sadly, bit rot does occur.

I apologize, but I don't have the time to fix this yet. Your alternatives:

  1. If you have access to a Mac, try the OS X version above. I know this currently works.
  2. If you know how to use Visual Studio or another Windows compiler, download the source and compile using the current version of ImageMagick.

Old instructions:

  1. Download and install ImageMagick from their binary releases page. You want the installer executable named something like ImageMagick-6.X.X-X-Q16-windows-dll.exe. When installing, choose the default options. You will need administrator privileges.
  2. Download Voronoi_Windows_Sep_20_2005.zip and unzip it.
  3. Copy the executable to somewhere convenient and run it.

Source

Download Voronoi_Sep_20_2005.tgz. The source is licensed under a copyleft license. CC-GNU GPL VoronoiStippler is licensed under the CC-GNU GPL.

Snippets

JPEGReader/JPEGWriter: C++ wrapper for libjpeg

JPEGReader/JPEGWriter are C++ wrappers for the widely-supported libjpeg library by the Independent JPEG Group. It supports querying and loading JPEG images, changing the target colorspace, loading low-resolution previews and quantizing to a fixed number of colors. It has no dependencies apart from libjpeg itself, is thread-safe and comprises of a single source file and header. It includes an example program and an IDE project for XCode 2.4, but should compile on any current C++ compiler.

Creative Commons License JPEGLoader is licensed under a Creative Commons Public Domain License. Download JPEGLoader-1.0.1.tgz or JPEGLoader-1.0.1.zip.

LinAlg: Fixed-size C++ vector and matrix library

LinAlg is a straight-forward C++ template vector and matrix library that provides fixed-sized linear algebra vectors and matrices, for example, a 3D vector of doubles or a 2D matrix of integers. The type used for an element can be specified. The elements are stored in fixed-sized arrays, so the compiler should have plenty of optimization opportunities. A test suite and example code are provided. You can also take a look at the documentation.

LinAlg is copyright Adrian Secord. Download LinAlg-3.1.tgz or LinAlg-3.1.zip. The previous versions, which included an explicit dimension in the template parameters, are still available: LinAlg-2.0.tgz or LinAlg-2.0.zip.

wxAGG: wxWidgets and the Anti-Grain Geometry Renderer

wxAGG is a simple example showing one way to combine the cross-platform user interface library wxWidgets with the vector Anti-Grain Geometry (AGG) renderer. The interesting class is AGGWindow, a wxWidgets class that stores a bitmap (in the native pixel-format of your platform) and directs AGG to render directly into the bitmap. This bitmap is then used to paint the window when requested by the rest of the wxWidgets framework. The source should hopefully be self-explanatory. Project files are included for Apple's XCode 2.x and Microsoft's Visual Studio 7/8 integrated development environments.

Creative Commons License wxAGG is licensed under a Creative Commons Public Domain License. Download wxAGG-1.1.tgz or wxAGG-1.1.zip.

glReadPixels() performance timing

Some graphics applications need to read results back from the graphics processor efficiently. This is not a particularly well-supported operation on most hardware, since graphics processors are heavily optimized in the CPU to GPU direction at the cost of the other direction. For the most efficient data transfer you need to choose a pixel format (e.g. RGBA, BGR, etc.) and component storage type (e.g. unsigned char, float, int) that best matches the hardware.

pixel_transfer_test.c is a simple one-file test that will tell you which combination of pixel format and component storage type gives you the best performance using glReadPixels() on a particular machine. It repeatedly calls glReadPixels() using all combinations of pixel format and component storage type and prints out the fastest pair in terms of data transfer rate and pixel transfer rate.

Creative Commons License pixel_transfer_test.c is licensed under a Creative Commons Public Domain License. Download the code.