Infrared Drawing Installation: Drawing 2D images based on Tracked LED Pen?
Jitter newbie here, wondering how difficult of an installation this would be to put together for an Art Class I am taking. I have done some tracking using the wiiremote’s infrared camera before using laser pointers and infrared LED pens, so I know how to get the drawing part set up, but the rest I’m not to sure about… Here’s what I’m going for:
The user will use an LED pen to draw a line on a projected surface. The patch will generate a line segment based on the start and endpoint of the user’s "stroke." Then Jitter would select (randomly for now) from a specified library of .bmp files and "draw" in that figure according to the orientation of the line segment that was drawn. The images will be "lassoed" (cropped to their form) digital photos of random objects or people. Each one will have a "skeleton" that will be used as a reference for orientation according to what angle the line was drawn. So, this will have to be saved as some kind of metadata with each file or group of files. After x number of lines are drawn, the image is saved to a new .bmp file. This would give the user the sensation of painting an entire scene or portrait using just minimal "brush strokes."
I’m pretty sure Jitter is capable of doing all that but these are the parts that I could use some advice or at least a hint for what objects to look at:
1) storing metadata for the "skeletons"
-Maybe this isn’t even necessary if I just save each file so that the default orientation would just be straight up and down? Then I would just have to measure the angle of the drawn line and offset the .bmp by that much
2) Getting a straight line from the user input
-It is likely that since these users will not have practice drawing straight lines, and they might forget to release the on/off for the LED in time, creating an unwanted curve or tail at the end of the segment. I would then need a way to average the line out or tell it to take just the part that follows one consistent direction across the screen
3) Using the angle of the line input to tell Jitter how to draw the next .bmp
– For now I just want the images to appear roughly in the same region of the projected surface as it was drawn and at the same angle
– Incorporating Scaling would be nice, but not essential for this first version
If I can learn how to accomplish those three tasks, I think I should be able to patch together the rest in Max. Let me know if you have experience with anything like this, or can help point me in the right direction. So far, I’m just working with an LCD for drawing the line input, and not really sure how to convert it to a jitter matrix so it can be properly analyzed by whatever jitter objects I will need. Thanks a billion,
Interesting project with some definite challenges. You can start by replacing lcd with jit.lcd though? so it’s in a matrix form for you. You might look to jit.sketch as well for drawing the lines…working in GL land might make some of the orientation etc. easier later, anything you draw can be scaled/rotated/repositioned after drawing, unlike LCD or jit.LCD.
For the line drawing, I would rely on the start/stop points only, and just connect a line between these. It won’t feel as "organic" but you’re not really making a "paint" program, it sounds almost more like a CAD thing…? so that lines are auto-straightened, you’re building a kind of architecture in the scene? I think it would be a bit tricky to take a curved line and figure out a good straight-line approximation, though using the start and end points and the delta it would be feasible. You could easily incorporate scaling with the length of the line.
Curious to hear your progress, this seems like a visual-art version of many "paint-music" ideas which have been tossed around. I like the idea of making minimal brush strokes able to paint a whole scene. I also wonder how far you could go with the technique, it might be interesting to have additional refinements possible with specific brush strokes.
And, if you use GL land you can make it 3D if you want… :)
Thanks for the help again, seejayjames… Really appreciate your support and encouragement for all my wacky Max ideas, seems you always have some very helpful hints.
So, I’ve started messing around with jit.lcd, and got it to "paint" an image (as long as I started in the top left and sloped down to the right), and everything scales fine. Assuming I was satisfied with having all of my images oriented vertically, I could almost be satisfied with what I have and call it a day. However, I wish there was some way to take the slope of the line (which I have already calculated inside of the mousedrawing sub patch) and use this to set each new object’s orientation. There doesn’t seem to be an offset or orientation attribute for the "drawpict" command in jit.lcd, so I guess that means I will have to use a separate jitter object to do this. What do you suggest as the simplest 2d method for achieving this offset idea, jit.rota maybe? I don’t need to worry about 3d drawing for now, just something that would allow me to rotate the picture based on the slope between the start and end points of the line. I’d also like it to keep the new image file centered over the drawn line, and not just use say the left or right edge of the image to line it up.
I really wish for simplicity’s sake that in the end I could draw in the same window over which the images appear, and I hope this will still be possible even if I need several different Jitter objects to get the proper orientation. This may seem like a silly question, but I would be feeding this other jitter object (the one for handling the rotation) into the jit.lcd, right? Or would I combine them both into a new pwindow?
Here’s what I have so far, so you can see where I’m at so far. Thanks again for the help,
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 3826.3oc6cssjahjD841eEUnvOLSDs0TW4x9lmc+B1XdX2XlM5.AH0Xi.s.x t6ch4eeqaHAcykRxBTo11SLpEf.x7TYlUlYUUV+46tawp7mhKW.9afeGb2c+ 46t6N4oDm3N8w2sXavSgoAkxe1hr3ulu5SKtWcop3mpjmdGXa99x3nhfuljs o9xqyypJ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