The writhing number is a standard measure of the global geometry of a closed space curve. It is an attempt to capture the physical phenomenon that a cord tends to form loops and coils when it is twisted. It attracted much attention after its relationship with the linking number, expressed by the following White Formula, was discovered independently by several researchers:

Lk = Tw + Wr.

Here, the linking number, Lk, is the signed number of crossings between the two boundary curves of a closed ribbon in space, and the twising number, Tw, is the average signed number of local crossings between the two curves. The non-local crossings between the two curves correspond to crossings of the ribbon axis, which are counted by the writhing number, Wr. Besides the mathematical interest, the White Formula and the writhing number have received attention both in physics and in biochemistry. For example, by representing DNA as a ribbon, the writhing number of its axis characterizes the so-called "supercoiling" phenomenon of a circular DNA. As such, in computer simulations of supercoiled DNA by Monte Carlo, Brownian dynamics, and molecular dynamics methods, it is sometimes necessary to calculate the writhing number for a given molecular conformation.

We have developed an efficient algorithm to compute the writhing number of an input polygonal curve. It runs in near-linear time for most data in practice. A readme and a sample input data file are included in the download packages.

Platform: Sun Solaris
File size: 800 kb
Download writhe.tar
Platform: Linux
Tar-ball file size: 970 kb
Download linux_writhe.tar
"Computing the writhing number of a polygonal knot," P. K. Agarwal, H. Edelsbrunner and Y. Wang, to appear in DCG, also appeared in Syomposium on Discrete Algorithms, 2002.
Writhe was developed by Yusu Wang.

For more information, please see http://www.cs.duke.edu/~wys/writhe/ or contact Yusu Wang <wys@cs.duke.edu>