Area of Interest// blog

Web Audio – It is finally (almost) here?

You might have seen that the new Angry Birds for Chrome has audio support but it falls back on Flash.  Boo. Cheating.

Then I saw this – http://sdfphd.net/creativepact2010/sdfahDev_0007.html - and realized that making proper music in a web browser isn’t just a far-off dream anymore. See what you can do with Javascript, the new web sound API (Chrome, Webkit, Mozilla) and Processing.js? Hmmm….

Continue reading

TEDxKids Brussels 2011

Last week (June 1st) the gang at TWSU (Technology Will Save Us) and I took two groups of about twenty 10-yr-olds through a basic soldering workshop as part of TEDxKids Brussels 2011.  This was both one of the most tiring and most inspiring workshops I’ve ever taught, with the added bonus that directly afterwards we gave our TEDx talk!

IMG_4205

 

Continue reading

Processing Minimal Scenegraph

I’ve been thinking recently about Processing and animation.  One of the really nice things about it is that it lets you build up visuals from the ground up, from fairly minimal amounts of code and basic shapes.  Contrast this with Flash (ActionScript 3.0) where immediately you are using complex objects with a display hierarchy built-in.

Of course, it’s nice to eventually got to some sort of display hierarchy, where you have a system in place for rendering out visual “objects.”  At some point, you don’t want to draw rectangles anymore, you really want to start mucking about with complex combinations of shapes and movement.  You could graduate towards a real, industrial-strength rendering engine, something like the open source games engine AndEngine (for Android), or something even more powerful and confusion, but there’s not a lot of middle ground. (If there is, please share!)

What I’ve tried to do here is start up a compromise between an engine like AndEngine and, well, the pure basics of drawing things to the screen pixel-by-pixel.  I’m calling it Processing-Scenegraph,” and before you jump all over me and tell me it’s not a real scenegraph, well, I know… a proper scenegraph would have transformation nodes and color nodes and probably a compiler that stored local/global transformations in each node and updated when nodes were added/removed.  Etc etc etc.  But this version is designed for teaching, to be straightforward but also useful to those students starting out with games design and programming, and artists looking to make more complex animations using programming.

Hopefully you’ll find it useful, and please send feedback and post comments, it’s an open source project, after all!

http://code.google.com/p/processing-scenegraph/

Tracking Multiple Different AR Markers

Yes that’s right… multiple marker tracking in ARToolKitPlus on Cinder! And, fully configurable, using files loaded at runtime, on WINDOWS and OS X.

Dear God. It wasn’t easy… the documentation is like wading through a river of feces and trying to pick out the proper bit of corn.  (You’re welcome for that image, enjoy your lunch!)  But now it’s done.  Soon, this will be an augmented reality / realtime puppet animation application for a storefront in the north of England.   Of course, code to follow sometime mid-next month, let’s say.

ARToolKitPlus in Cinder

UPDATE: THERE IS NOW A BETTER VERSION HERE

 

Well, there you go.  I decided not to use OpenFrameworks for my project, after all.  I think Cinder looks more promising.  So, I spent a few hours today getting to know Cinder, and porting the ARToolKitPlus example to it.

This is my first attempt at a “Cinderblock” port of ARToolKitPlus, and it works just fine (although I have a few questions – please read on…)  It’s rough and ready, and comes with a working example.

To install, put it in your “blocks” folder in the Cinder folder structure (probably under “cinder_0.8.2_mac” or whichever version you’ve got).  There’s an example, included. It works on my OS X 10.6 machine, but I think that it probably won’t work just yet on Windows, due to the different resource loading.  It would be great if someone sorted that out, but like I said, this is just a start.

http://stuff.openlabworkshops.org/ARToolKitPlus.zip

So, about the example – I’m trying to get the screen coordinates of a tracked marker, and having trouble.  I tried using the “unproject” function I found on the forum here, and the maths look right, but in my app they don’t come out at all with the right scale.  I have a feeling it’s something simple.  If you think you can help, look at the unproject() function in the included sample project and please post an answer!

Happy reality-augmenting,
Evan

http://openlabworkshops.org

ARToolKitPlus in OpenFrameworks

I’ve been working on an interesting project for early 2011 using augmented reality (AR) and Animata (from Kitchen Budapest). I’ve looked at using Processing for it, and Flash, but nothing really speaks to me as far as speed and reliability and flexibility of development.  So I looked into OpenFrameworks and ARToolKitPlus, which was recommended to me today in a total coincidence involving our flat’s heater breaking and forcing me to work in the London Hackspace.  So, I randomly and luckily met Tasos Varoudis, who teaches at UCL and knows a lot about AR, and was kind enough to help me find the required code to get started.  Which was not easy! All the links I could find were either broken or half-working.

So, dear reader, in the spirit of openness, I offer you a download of the ofxARToolKitPlus addon and a working example (you will need to modify it slightly for Windows and Linux – see the comment in setup() in testApp.cpp). This works with the newest OpenFrameworks version 0062.

Happy Reality Augmenting!

Winter Particles

Happy Holidays! It’s been ages since I posted anything, mostly because I’ve been so busy teaching at UCA Farnham and Openlab Workshops.

Here’s a little something for the holidays. The code is below, and the source image was courtesy of Jan Tik on Flickr.

Continue reading for source code…

Using the Output Plug to Drive a Solenoid

Output plug: http://cafe.jeelabs.net/lab/op1/#index3h1

JeeNode v5:

http://talk.jeelabs.net/topic/207

“To drive a small lamp or motor, you connect it between COM and the output pin(s), and you connect the power supply between COM and GND. You can probably find many examples when googling for details regarding the ULN2803 chip on that board.”