Update of /cvsroot/wcurve/wcurve In directory www.bioinformatics.org:/tmp/cvs-serv27858/wcurve Modified Files: globaltypes.h plotview.cpp plotview.h sequenceview.h wcurve.cpp wcurve.h wcurvedoc.cpp wcurvedoc.h wcurveview.cpp wcurveview.h Log Message: So, here's what I did: My initial task was to implement a "line-wrapping" feature in Wcurve. As easy as this sounds, it posed a few rather interesting problems. First off, how can we easily know the maxima and minima for a curve, so we can display them compactly stacked on top of each other? The range has to exist as a diameter, not just the span of the curve on the x- or y-axis. This is for rotation purposes (so when the curve's linewrapped, it can be rotated). Now, if we need a radius, where's the center? We can't use (0,0) since curves can be entirely above or below the x=0 or y=0 planes. The center has to be defined by the curve. This problem, as I've found in my computational geometry book, is known as the "smallest enclosing circle" problem, and it's a bear to implement. So, rather than re-inventing the wheel, i discovered a library called CGAL which has the algorithms I needed. Still, to run this on a sequence of billions would bog the program down quite nicely. So, instead of running the min_circle algorithm on all the points, I decided to throw the points into a 2D-array of boolean "buckets" that indicate whether a point exists within a certain range (from gamma to negative gamma in both x and y). This seems to work nicely. Another feature which was implemented in this update is the inclusion of an "auto-rotation" feature. This animates every curve displayed, making it rotate around it's arbitrary center. Nothing too crazy here. Yet another modification was how the Wcurve Plot windows open - instead of being fullscreen, I decided to make them open as strips 1/5 the height of the workspace and the entire length of the workspace. The curve stretches from the top to the bottom of this window. When this window is resized, the curve is automatically resized, too, to fit the new height. One thing I wish to do later, which might prove to be tricky, is to add a horizontal scrollbar in the Plotview window. That pretty much describes what's been done. If I've horribly munged the code, please inform me. Thanks. -James Kirk