0 Replies Latest reply on Aug 15, 2007 3:35 PM by Gil1

    Help for an experiment to build an sketch recognizer

    Gil1 Level 1
      Many months ago I saw the sketch application made at MIT http://www.youtube.com/watch?v=NZNTgglPbUA&eurl=
      and http://rationale.csail.mit.edu/project_assist.shtml

      and I would like to try to do something similar in Flex or Flash CS3 just for fun.
      I think it could be an interesting exercise.

      However, before I start I would like to get some ideas and suggestions from others on how to do this sort of thing.

      My first ideas are:
      Start simple. Thus, first try to recognize if the person is trying to draw a rectangle, another polygon or a circle.
      When the user clicks to start the app. records the initial mouse position and as he moves the mouse more points are recorded in an array. If the angle change is > something the app. eliminates the intermediate points between the first point and the last point before the big angle change. This should work for polygons with relatively few sides.

      To recognize circles, if the app. detects too may angle changes in the same direction and the end point is close (3-5 pixels in x and y) record as circle.

      If an drawing is recognized as a square for example, replace it with a "real" square object, that may have some predefined behaviors, like the balls in the MIT app.

      Well those are my initial thoughts, but I want to have some more ideas before beginning this experiment.

      One more thing. The idea is that the user starts with a blank canvas. No buttons or anything to drag and drop. The challenge is to design an application that can recognize the sketches made by users and do something based on those sketches. For instance, if a draw a circle on top of a slope the circle will roll down. or if a draw a rectangle (and its recognize appropriately it becomes a button that can do trigger some event, etc.