I'm writing a research app that will allow users to draw a function by hand and dump the coordinates to a file for use in another application. I've been playing around with this sample for drawing: http://blogs.msdn.com/b/expression/archive/2008/02/02/a-small-inkcanvas-sample.aspx
I've hit a wall trying to figure out how to restrict user input to functions. In other words, the user isn't allowed to draw any curve that has more than one point at the same x coordinate. What's the best way to approach this problem?