Here’s another mini sketch, using the tester from the wordpress processingjs plugin. Bear with me, folks..Source Code
Tag Archive for processing
processingjs
Here is the latest in a small series of tests, embedding processing sketches on this blog. This one uses the wonders of processingjs, John Resig’s fantastic port of processing to javascript. This animation is nicked directly from the processingjs website, so please don’t hold that against me. Some oddities notices so far – I can’t seem to work out how to include text in processingjs sketches, apparently there’s some kind of glyph-y magic which helps – and the mouse interaction seems broken. Hmm..
Related Posts:
Batch Convert Images in OS X
This post is more for my benefit than others, but you may in the end find it useful anyway. I’ve recently come across a handy batch conversion technique for switching image formats in a snap;1. Put a load of images in a folder2. Open the Terminal3. cd to the current directory4. type in
mkdir jpgs; sips -s format jpeg *.* –out jpgs
done.I found this one whilst looking for a quick and easy way to switch a folder of .pngs to .jpgs, without needing to download/purchase any additional software – and programming something quickly in Automator seemed like more work than was necessary!If you’re looking for other solutions to this problem, this page had a few other alternatives.Happy converting!
Related Posts:
processing.js
This is a quick test of HasCanvas for publishing processing sketches in a web browser. HasCanvas is built on the very nifty processing.js platform, which means publishing processing sketches is about as easy as clicking 1 + 2 + 3.see for yourself;
Related Posts:
simple metro
For students in the 11217 introduction to construction class;Here is an example of a simple metronome counter which moves a line up and down a sketch window over a period of time. You should be able to follow the comments included to see how you might plug your sensors and motors into this sketch to easily arrange for your motors to move a) automatically left/right over a period of time and b) increasing in intensity based on a reading from your slider/light/proximity sensors.For the purposes of instruction and demonstration, i’ve connected the line movement to simple mouse input – move the mouse left/right to influence up/down motion – so you can see how your sensors might influence pre-programmed movement.Give this sketch a try… Read more
Related Posts:
Phidget Interface Kit + Processing
Here’s a simple example for connecting a PhidgetInterfaceKit 8/8/8 to a computer, using Processing.
You will need to download the phidget21.jar package from the phidgets website, find it in the ‘Programming’ section in the java examples section. Once downloaded, just use Sketch>Add File… to add the file to your sketch. Connect via USB and you’re ready to go. I’ve labelled variables based on the sensors I was using, feel free to reassign and use as you will;… Read more
Related Posts:
Phidget Servo motor output via Processing
I’m currently preparing for a short piece of processing tutoring in the Bachelor of Architecture course, commencing tomorrow. The course is a 1st year construction subject, in which the year group is designing modular structures from found objects (read; whatever they can find in large amounts at Reverse Garbage), with a 12-15 unsuspecting students are going to be shown the slippery slope that is processing, all in the aim of augmenting small construction projects with responsive elements.I’ve used the standard phidget servo motors with max/msp before, but I’ve decided to switch focus to processing so such solutions will no longer suffice. There are some benefits to not using max/msp in the university context;
- Runtime – i can’t count the number of times we’ve built test prototypes and final projects only to see them fall over due to the small number of licences we’ve access to on campus. The runtime solution is acceptible for last minute, last chance, last straw moments but it’s just not good enough for day to day use or experimentation.
- The extraordinary cost of licensing – the licences bought by the university come at a ridiculous cost, not to mention the involved installation process. Processing by comparison is such a simple install – for both the core components and the additional libraries.
- Extensibility – max/msp additional objects are always a welcome addition to the program, however the objects themselves tend to be closed off, limited in how much they reveal of their inner workings and can be fairly slow.
To this end I’ve enjoyed the processing learning curve, there’s been more than enough learning resources available online and in book form, so I’m definitely pushing for its’ inclusion in the syllabus in the arch. faculty. Anthony Burke has been teaching processing in the master of architecture course this semester (with assistance from the computation whiz-kid Ben Coorey), so along with the arduino hardware the transition from proprietary to open-source projects is well under way in the DAB.So to proceed with the real agenda of this post, I was searching for simple code to interface with the PhidgetServo motor output units we’ve been using, this time working in processing. I couldn’t find any decent examples online so had to cobble together one myself.Read on for more;… Read more
Related Posts:
fluid updated
I’ve spent a bit more time cleaning up the fluid blobs examples I made last week, this time limiting the Region of Interest and fiddling with the fluid interaction. Also newly included is a smarter way to interact with the blobs (in the code, i mean), pulling out more precise locational data. I’ll be looking to mine this one a bit more extensively than I did with the filtration fields installation – and since I seem to be getting better now at things I was attempting before – this should be a lot more fun.In the mix still is some video over network action, as well as potentially a database record of the motion over time. I’d like to develop this as an interactive (from the visualisation point of view) interface where you could select a day, week or month and view the fluid ripples as they occur, like a fluid time-lapse of the actual motion from the courtyard. We’ll see.
Fluid Blobs v2 from Jason McDermott on Vimeo.
Related Posts:
fluid blobs
Linked below are some early results from a new series of sketches I’ve been working on using Processing. These sketches continue in a long line of projects I’ve completed recently using simple camera tracking algorithms to infer interesting patterns of movement in urban spaces.The first example is a calibrated blob tracking experiment, using the excellent and very well documented OpenCV library for processing. A few simple modifications to the setup parameters allow for a very customisable tool, able to withstand many of the constraints live webcam installs can throw up. I’ve tested this in a number of places (my bedroom wall, lit by a single lamp tends to be the best contrast) and will have more to say on the nature of live webcam video in the future.
OpenCV blob tracking – calibrated from Jason McDermott on Vimeo.
The second example is a first attempt at combining the live blob tracking with the wonderfully funky and playful MSA Fluid library also for processing. This lib is geared towards touch screen interfaces and screen based mouse interactivity – but I immediately thought it would be the perfect partner for my webcam based projects (or even accelerometer/phidget/slider/midi sensor data). It wasn’t very difficult to swap out the mousex/pmousex variables for centroid x/y data, so the first test has been deemed a success. I showed this yesterday to Frank/Ale/Amy/george/anyone who would stop for more than 2 minutes in the interactivation studio and it was a big hit
OpenCV + MSA Fluid (Processing) from Jason McDermott on Vimeo.
The third example is significant for a couple of reasons – it is another combination this time using recorded video of an actual installation space (filtration fields / DAB courtyard) thus requiring another version of the calibration – but also my first experiments in putting together an arrayed interface between the blobs and the fluid.To explain further; Firstly it’s easy to switch out the mouse for ‘something else’ and inferring movement velocity for a single object/blob is simple. Secondly I wasn’t so sure about the way to apply this singular blob mousex/pmousex-esque technique to many objects at once. Thirdly I wasn’t sure if it would all explode in one big fluorescent, particle mess!
OpenCV + MSA Fluid (processing) test 3 from Jason McDermott on Vimeo.
[Update]< <note, v3 will be embedded when vimeo uploads my video. since when does a new video have to wait in a queue for 30 minutes??>>In the end I’d say it’s mission accomplished, certainly with calibration tweaks to occur before I’m happy to unleash this on an unsuspecting public. I’d be interested to see how this could influence peoples’ behaviour in the space – whether or not we would see people dancing/swimming/painting the space of the courtyard. I’m curious also to see how this kind of new interaction with the space of the DAB could filter into a new perception of the building as not merely a space to move through but one which is open to new forms of physical conversation.
Related Posts:
Smart Light Fields
In addition to my involvement with the janus project for the Smart Light Sydney Festival, Joanne Jakovich and I were invited to collaborate with the NSW Department of Planning in an ambitious short term project during the festival. The Department of Planning, along with Metropolis and D-City had the initiative to setup a small amount of resources for live event data tracking to be visualised for the duration of the festival. Our first taste of this was in an email inviting us to join, with a specific aim towards generating realtime visual information using passive bluetooth tracking technology.I’d worked before with bluetooth tracking (in the 2008 UTS MDA masterclass Street as Platform), and I’d recently mastered the small monster of embedded MySQL insert queries so it felt quite appropriate to combine these two techniques in producing the visualisation. In essence, the project asked for the following;
- Networked and located sensor nodes, tracking any visible devices nearby
- Central storage and collation,
- regular output of recent activity (the last 3 hours)
- visualisation of current activity and any paths of movement picked up by the sensors
The project had been allocated resources for sensor nodes, internet connections, software programming and some kind of visual output – in this case a projector. Joanne managed to secure space in Customs House for the project to live, we arranged for the hardware and software combination to be installed and we were off the ground. Ben Coorey (who had been a stellar student in the streetasplatform masterclass) came onboard to help us produce the visualisation in what ended up being a solid fortnight of work. We went from concept through design and installation in just over two and a half weeks – not an insignificant feat!This project marked a first in many regards – it was the first time I’d worked in this capacity as an artist/designer with an external client, providing data surveillance and visualisation with aesthetics and information. It was the first time I’d been given access to such a large data set, with potentially hundreds of thousands of visitors making their way to the SLSF precinct during the three weeks of festival activity.It happened to produce the first meaningful coalescence of a body of researchers Joanne and I had been working to pull together for the last 6 months – into the newly founded and launched anarchi.org. We were now an organisation, able to pull in assistants and coders, all within the framework of a budgeted project, able to provide payment for their time. This mightn’t seem like much of an achievement, but having worked with friends and colleagues for some time now (relying on generosity and willingness to help), it gave me a huge sense of pride in being able to offer a small sum of money to repay the hours of work put in.See Also;anarchi.orghttp://www.designbuildblog.com/2009/06/16/smart-light-fields/http://www.australiandesign.org.au/