1. A pen-based computing system for estimating the orientation of a segment of digital ink, the system including a pen-based computing pen to input digital ink, and a processor adapted to estimate the orientation of said segment by measuring the azimuth of the pen at a sampling rate during writing of said segment by an optically imaging pen on a surface printed with tags, each tag encoding data on an identity of the surface associated with a digital description of the surface and on the respective location of that tag on the surface, the digital ink being generated by associating the digital description with the data encoded by the tags optically imaged by the pen during said writing; determining a mean azimuth for all of the sampled points, and subtracting the determined mean azimuth from each measured azimuth of each sampled point of said segment.