Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!well!shf From: shf@well.UUCP (Stuart H. Ferguson) Newsgroups: comp.graphics Subject: Re: Cleaning up freehand drawings Summary: Slinky model... Message-ID: <14020@well.UUCP> Date: 10 Oct 89 05:14:15 GMT References: <1580002@hp-ptp.HP.COM> <8387@ardent.UUCP> Reply-To: shf@well.UUCP (Stuart H. Ferguson) Organization: The Blue Planet Lines: 48 +-- sleat@ez.ardent.com (Michael Sleator) writes: | In article <> garye@hp-ptp.HP.COM (Gary_Ericson) writes: | >What I mean is this. Suppose I want to draw a straight line. When I move | >the digitizing pen (or mouse), I will undoubtedly not keep my hand steady | >and the line will be crooked. If the computer follows faithfully, I | >will end up with a multi-segmented or curved line. But what if the | >system decided that because all the points I've digitized lie within a | >certain tolerance of a straight line that I really wanted a straight line | >and it draws one for me. [ ... ] | | [ ... ] It seems | to me that what you really want is a low pass filter on the curvature. In | general, the "jigglies" (to coin a term) will be significantly higher | frequency | curvature components than the intended curves. This suggests that there is | ample room for choosing a filter cutoff frequency that will kill the jigglies | and still allow the desired curves to be drawn. It does imply that if you | actually want to create an inflection point, you probably need to do it with | two different strokes, but that seems intuitively sensible. I saw some interesting research presented a few years ago by some folks from Schlumberger(sp?) in Palo Alto, I think (same folks who did the "Cooking with Curt" Siggraph video). They were using "strings" or "snakes" or something like that to do some image analysis tasks. The snakes were basically spring and mass models that reacted to some feature of an image as if it were a potential field. For example, if you take the gradient of an image, negate it and call it a potential, then the snakes will tend to "fall" into the potential wells caused by sharp changes in the image, such as lines. But since they also have some stiffness, they will actually make a nice fit of the line despite noise in the image. This might make an interesting basis for a nice curve drawing tool. Let the user draw the noisy line that a shakey hand will draw, but then lay down a snake along the same path and let it relax into a nice curve. The speed of the mouse at different places along the path could map into the stiffness of the snake at those places so that where the mouse moved slowly the snake would fit more exactly (like inflection points), and where the mouse moved quickly there would be more smoothing. The user could tune the stiffness or perhaps go back and manipulate the snake directly. There's a paper about these beasts as well as their 3D and phase-space counterparts by the same folks whose name I couldn't remember very well above. The real-time demos they showed looked fast enough for the purpose proposed. -- Stuart Ferguson (shf@well.UUCP) Action by HAVOC (ferguson@metaphor.com)