Animated drawing

Hello everyone,
I’m new to Open Frameworks and I want to try different things to learn it. This might sound really obvious and easy for most of you, but I can’t think of a way to start. I have an idea, which is animate lines to create drawings. I have a group of drawings in pencil that i want to translate to OF, this way, I can create a line and animate it to complete each drawing. This drawings can be triggered by a click on the keyboard or by a click on a mouse.
So, the first thing I thought was to create some sort of library (my background is ActionScript as you can see) with the information of the coordinates of each drawing. I would assign a position to each point to be drawn, and later create a line that will be animated from point to point.
The other option; loading the drawing to OF, reading the pixels and recording the points on a vector.
So I guess the real question is, how can I record the points from a drawing into a vector?

Thanks!

Hi,
maybe you could use the opencv addon and do a contour track on the image. if the drawings stand out clearly from the rest of the rest of the paper it could work.
once you do that you can access the points that make up the contour.

hope it helps

rui

Hi Rui,
thank you for your response. I’ve been thinking of that too, but since I’m starting with OF and I have never worked with opencv, I never considered this option as a real one.
Another thing that I was considering to do was to re-draw on an OF app and store those points for animation. With some sort of playback. I’m working on some code and I’ll upload it later tonight.

Again,
thank you so much!

I’m kind of stumbling upon the walls right now.

some of this drawing code from my class might help:

http://visiblevisible.org/teaching/drawing/blog/?cat=4

there are some examples of using a vector to store points and draw them, as well as more funky / esoteric stuff like resampling lines, finding curvature, tweening, etc

hope that helps &

take care!!
zach