No new code here
This is an old page for my smaller open-source programming projects. For current and future projects, I've switched to hosting my code on Github
The following are scripts and programs I've written for myself over the years. Most are distributed under the terms of the GNU General Public License
I am making these projects available in the hope that they might be useful; keep in mind that most of them started as a quick solution to an immediate need, and evolved (some more than others) gradually from there. Some are relatively polished and complete, others less so. None are ready for 'production' use in any setting.
You may notice that I like the programming language Python.
trg - Display the internal references of a LaTeX document graphically New.
This short python script parses a LaTeX source file and generates a postscript image showing the internal reference structure of the document. The output is a "semicircle plot" in which semicircular arrows connect pairs of points along a horizontal axis that represent the line numbers of corresponding \ref
grlen - Compute length functions on a grafting ray New.
This program is related to
with Young-Eun Choi, Michael Wolf, and Kasra Rafi on the hyperbolic
geometry of grafting rays in Teichmüller space.
's program "kleinian"
's numerical conformal mapping package "zipper
this python script constructs a bending of a Fuchsian punctured torus
group, draws the limit set, conformally maps one of the complementary
domains to the disk, and then uses this conformal mapping to determine
the lengths of a given collection of closed geodesics. Due to the
relationship between bending a Fuchsian group and grafting a
hyperbolic surface, this is equivalent to grafting a punctured torus,
re-uniformizing it (finding the Poincare metric) and then computing
Note that this program can only explore a short initial segment on any
grafting ray, because it is limited to projective graftings that have
quasi-Fuchsian holonomy and injective developing maps.
dfiler - Document Filer New version, July 2010.
I use this python
script to organize the mathematical papers that I download from the web. This program helps you to choose an appropriate location and filename for a document by displaying a short section of extracted text (which probably contains key metadata like the title and author). Uses the wxPython
Changes in version 0.0.5:
Display informative error messages when text extraction fails; removed database code that never worked and was never used; include ".desktop" file for use with window managers.
Changes in version 0.0.4:
Better handling of missing 'wxversion' module and version detection in general. First version to be licensed under GPL3.
Changes in version 0.0.3:
Better wxPython version detection and selection; now scrubs unicode strings if wxPython does not support unicode, resulting in lower-quality text extraction instead of an exception and exit.
packup - Create a gzipped tarball from a manifest New.
Packup looks in a given directory for a file called "MANIFEST" that contains a list of filenames. It then creates a gzipped tarball of all of the files in the manifest, stored so that they extract to a subdirectory with the given name. I use this utility to package much of the software on this page, including packup itself.
tex-monolith - Remove comments and expand includes/bibliography in TeX/LaTeX New.
I use this utility to prepare TeX/LaTeX source for submission to journals or the preprint arXiv
. It strips all comments from the input file and replaces all "\include" commands with the contents of the files they reference. It also replaces the bibtex "\bibliography" command with the contents of the associated ".bbl" file.
lim2pov - Create POV-Ray script from output of Curt McMullen's program lim
script parses a postscript file produced by lim and writes the list of circles to a text file in a format suitable for use with the open-source ray-tracing program POV-Ray
. I used this script to create all of my 3D limit set pictures
hmath - BibTeX style with author initials and URLs
This BibTeX style is derived from Curt McMullen's
, which is in turn a better version of the standard style alpha.bst included with BibTeX
. The only
feature I've added to McMullen's style is the ability to include arXiv
-style eprint references in your BibTeX entries; this mechanism is also suitable for including URLs for preprints.
(BibTeX style file)
ps2web - Postscript to PNG for web presentation
This shell script uses ghostscript to convert the pages of a postscript or PDF document to PNG files at a resolution suitable for screen reading of larger text. This might be useful to put the transparencies from a talk on the web.
ps2web_full - Postscript slides to HTML gallery converter
A companion to the previous entry, this script calls ps2web and then creates an HTML galley of the page images using igal
h5frames - Create image sequence from HDF5 data
script generates a series of images from datasets in a HDF5
data file using Steven Johnson's
. It looks for datasets and groups within the data file whose names are part of a sequence (e.g. group01, group02, …) and converts them to similarly named PNG images. I used this script (and transcode
) to create all of my Bers slice animations
replacer - Replace delimited text
This shell script replaces a section of a text file with the contents of another based on arbitrary delimiters. At one time, I used this extensively to generate the HTML for my web page from a bunch of data files.
assembleppm - Assemble PPM chunks from POVRay distributed rendering
The ray-tracer POV-Ray
supports partial rendering, where a horizontal slice of a scene is generated. However, the resulting PPM files are technically invalid because the header size information refers to the entire image, rather than the rendered section. This small C program assembles a bunch of such partial image files into a single valid PPM.
This utility is based on combineppm by Paul Bourke.
Download: assembleppm.c (C source)