Posted tagged ‘programming’

Detection with Processing

March 14, 2010

Right I’ve been going around in circles but I am now hoping this is the last time. I’ve decided to go back to Processing as it allows me to use the feed from the web cam and manipulate it using little code which I am told is more reliable in this context compared to Flash. Soo even though I found this really cool example (try the demo if you have a web cam): http://blog.soulwire.co.uk/code/actionscript-3/webcam-motion-detection-tracking which uses Flash, I am going to actually use Processing which is actually easier to understand (now that I look at it properly) and that will probably take less learning to adjust.

The official info on Processing can be found on their web site: http://processing.org/
And here are a couple lines from their home page:

“Processing is an open source programming language and environment for people who want to program images, animation, and interactions.”

I will be using OpenCV (a library which is imported into Processing) to get a basic black and white image of the floor area to project onto my work which will be mounted on the wall. This way the viewer can literally move around on this floor  in order to alter the areas that are illuminated and try and play around with manipulating the shadows and reflections that are projected from that. Obviously it may not work as well with just heads and shoulders in view (remember it will be an aerial view) but that’s something I need to test in the next couple of weeks.

Here are a couple of test images from the camera view as processed using OpenCV and the blobs() method which by the looks of it calculates where whole ‘blobs’ are in the image, and constantly checks for where lines merge or disconnect in objects, so if one object comes in front of another then it would change where the edges are detected (I think).

I changed the contrast and colour from the default which is grey and white and used a book cover and a cd for the following to give a better idea of how it cuts out things that don’t have whole areas defined and focuses on those that do:

Image of book cover with Blob() function using OpenCV in Processing

Image of an intricate book cover as seen using the blobs() method with OpenCV in Processing

Image of CD processed with OpenCV using the blobs() method

The results aren’t as predictable as they appear in the above images though. They constantly change and it’s hard to pinpoint exactly how movements and changes in the view affect what is then displayed. I will need to play around with this quite a bit to make it less sporadic and more intuitive so that it works better in the show.

The code is really short and simple and there are quite a few examples on the OpenCV resource page: http://ubaa.net/shared/processing/opencv/

You don’t need to even be able to understand this stuff to try it out. You can simply download the necessary software and additional libraries from the two links I’ve provided. After installing you can either try out the examples already in the Processing library (really cool ways of producing generative art with this) or by pasting in code found on the two sites to view and play around with the results. There’s also loads of examples where you can interact with a cursor or movement through a web cam to change the visuals. There is much fun to be had!

Advertisements

Zero to Infinity – connections are made

November 24, 2008

I was invited, by a friend, to attend the Zero to Infinity event at the Dana Centre South Kensington (Thursday 20th November 2008).

A quick look at the panellists and the topic for discussion sparked some interest with me. These panellists included:

Paul Prudence, generative artist
Eleanor Robson, historian of mathematics, University of Cambridge
Marcus du Sautoy, mathematician, University of Oxford
Jane Wess, curator, Science Museum
Facilitator: Rachel Thomas, Editor, Plus magazine

Panellists

From this list of names only one stood out to me and that was Marcus du Sautoy. I had recently viewed his documentary “The Story of MathsThe Language of the Universe” on the BBC (thanks for telling me about it Simon) and thought he was great at explaining math related theories in a friendly and an easy to understand way.

The four very different backgrounds of the panellists was great as it provided different views on the same subject. It was clear that different uses of the mathematical theories relating to infinite numbers, the idea of multiple infinities and whether the number zero is something real or abstract can allow for connections in different areas of practice and study.

Midway through the talk we were split into two groups to participate in a short workshop first off with Marcus du Sautoy. This was a brilliant and practical demonstration to help us understand how one infinity could be larger than another. Ok there were many things floating about such as how fractions and decimal numbers could be used to check against whole number and negative numbers and this was delving into scary territory for me – maths not being my forte. So these further explorations into different types of numbers, rational and irrational, and the stark statement from Du Sautoy that there are different types of mathematics just completely lost me. At one point I had to just accept that there are many possibilities out there in the universe numbers and mathematics are perceived and manipulated to prove various theories using various methods.

Even then, Du Sautoy’s enthusiasm made the workshop enjoyable. Even though there were, well lets say, some brains participating too who were determined to prove something by asking questions that could only really lead to a debate that the rest of us wouldn’t be able to keep up with, it was quite funny to see that not everyone had the same views. And I’m pretty sure one man was actually flirting with him and using his mathematical knowledge to impress him!

Anyway so the next workshop was more of a historical look at how the number zero came into existence and its early use by the ancient Babylonians who kept records of how many different types of cattle were collected and received for the king. This part of the workshop was overseen by Eleanor Robson of Cambridge University. She explained that the Babylonians used to make marks representing different numbers on chunks of clay. This allowed for the accounts to be preserved for thousands of years. An empty space basically represented a zero. Of course their idea of the number zero was used merely for counting that something was not there but not in the same way it is now used for example for negative numbers and calculations of the abstract kind.

Twelve German Jetons - The Science Museum

We also looked at some of the shapes included in a mid 17th century wooden learning box – based on the teachings and principles of Euclid’s geometry. These were original items from the Science Museum’s collection and explained to us by curator Jane Wess. The collection included abacuses from China, Japan and the West where the base numbers for counting were all different.

Euclid's geometry - wooden box of shapes from 17th century Abacuses

Having reached the last part of the evening we heard from Paul Prudence; a generative artist and Video Jockey (VJ) whose work was displayed on the screen in the room. The display was of moving tesselated digital imagery. These images were based on geometric forms relating to the theories we had been hearing about earlier in the evening and in the workshops.

View a video of his work here: http://www.transphormetic.com/2_talysis2/talysis01.htm>/a>

Fast Fourier Radials - A spectrographic visualisation of sound

http://www.transphormetic.com/12_FFradial/pics/02.jpg
Fast Fourier Radials

I was in awe. He had succeeded in creating digital work based on geometric shapes and from this were produced beautiful patterns. So obviously all of this started ringing bells in my head. I was thinking to myself ‘I need to ask this guy some questions and find out what processes he is involved in, what software, which techiniques, etc etc’. I was very curious. So I waited till most people had started dispersing after the talk and told him about the MA and why his work was of particular interest to me in relation to my project. He gave me some of his business cards and encouraged me to take as many as I wanted, as he had so many and each had a different image on the back (stills from his work). They were really cool so I took six 🙂

Talysis 2

http://www.transphormetic.com/2_talysis2/talysis05.htm
Talysis 2

I found a lot more information about Prudence’s work and recent project history on his website: http://www.transphormetic.com/

And I don’t think I could be any more amazed and slightly jealous. He uses Flash and ActionScript to write programs which then produce the patterns and some of them in real time!!! The use of algorithms and mathematics (written into the ActionScript) means that numbers can be used to produce 3d effects of shapes within certain spaces. These have boundaries in which the pattern might become curved along the outer curve of a sphere or within the inner curve and so producing both a convex and concave look with the shapes getting smaller or larger as they move along, further toward or away from the x axis. Ok I’m not sure if I explained this the right way.

Heres what he’s got in the biography section of his site which pretty much sums up his skills quite impressively:

Artist and real-time visual performer working with computational and visual feedback systems and video. Uses VVVV, Flash & processed Digital Video. Lecturer on visual music and syneasthetic art.

Researcher and writer at Dataisnature.

Freelance Interaction Designer and ActionScript Developer. Authoring chapters in a few books relating to computational design with Actionscript.

http://www.transphormetic.com/bio.htm

I’m glad to see a clear example of how a contemporary approach using the latest in technology and programming skills can be made the most of in order to produce something that connects all the ideas that are bought to light in the subject of geometry, shapes, and space (more specifically numbers and their connection to the theories of science and physics of the universe). I mentioned in an earlier post that it was hard to make the connections between the different subject areas as they could become very diverse and branch off into their own projects all together. But this is a great example to show that it is possible to make those connections apparent in one piece.

I feel inspired and have a positive feeling about achieving something great, as a result of this project. God willing 🙂

Don Relyea – Q&A

October 18, 2008


http://www.donrelyea.com/hilberts_2007/15_03.PNG

Well I emailed Don Relyea as I said I would (https://qunud.wordpress.com/2008/10/11/don-relyea-artist/) and very kindly he responded in detail with some very interesting answers and observations:

I really like your work involving the generation of geometric shapes with programming in interactive applets. What would you say triggered your desire to use these types of shapes in your designs?

Since most of my work is created in some kind of programming language, it is natural to describe shapes and forms with math and both 2d and 3d geometry. I have always enjoyed math. From about 1999-2003 I developed severe sleep apnea, this deprived my brain of oxygen and meaningful sleep. Over that time I began to lose the ability to do math, solve complex problems, and even routine programming exercises became extremely difficult.

I thought I was losing my mind. When I figured out what was wrong and started treatment, it was as though I had just emerged from a thick fog into daylight. I immersed myself in math and exploratory programming with a new found zeal. The recovery and subsequent rediscovery of my love for math was the catalyst for the burst of abstract geometric and space-filling curve works.

Considering how much emphasis has been placed on geometry in the past and the desire to create artwork based on exact measurements of shapes (e.g the use of golden ratio), where do you see geometry fitting in contemporary art?

Geometry will always have a place in the world of contemporary art. Successful artists are successful manipulators. Geometry is a great foil for manipulation. Why is it that people are drawn to compositions with certain proportions? When something is out of proportion, why is it so jarring?

I think that a lot of the answers to these questions lie in neuroscience and the way our brains are wired to recognize patterns and forms. There have been a lot of recent studies that show that we have at a minimum 2 brain functions going on at the same time, the executive mind and the habitual mind. The executive mind is what we engage when we encounter something new or need to solve a problem, the habitual mind is our autopilot. This is not a new concept, ancient Zen masters were aware of this. The habitual mind is programmed through repetition to detect patterns and shapes and it keys in on certain proportions like golden ratios, facial symmetry, etc. As an artist you can play with this feature in your viewers brains to evoke a response.

Mark Mothersbaugh’s current exhibit at LACDA titled “Beautiful Mutants” is great example this manipulative technique in action. http://www.lacda.com/exhibits/mothersbaugh.html
In “Bottom Heavy Pug” Mothersbaugh is challenging both the executive and habitual mind simultaneously, the picture looks enough like the original that your habitual mind immediately identifies it as a dog. Your executive mind also immediately recognizes that there is something proportionally awry with the picture. The internal conflict makes the picture memorable and engaging.

Bottom heavy pug by Mark Mothersbaugh

Along the same line of reasoning, works that are geometrically exact are equally engaging. Geometric perfection is actually quite rare in nature and we can recognize when a form is artificially perfect. In “Bottom Heavy Pug” the vertical symmetry is exact, we recognize that this is uncommon and take note.

I’d like to take this opportunity to thank Don Relyea for taking the time to answer these questions, and with such detail 🙂

There are loads more interesting projects he is working on, so once again I recommend a look at his site. In particular I’ve just noticed this project based on html layouts and table based html structures which actually form interesting imagery when viewed in a browser: the reductionizer.

Don Relyea – artist

October 11, 2008

I’ve just found this site a sort of online portfolio of work by Don Relyea. http://www.donrelyea.com/

Some of Relyea’s art projects focus on the use of a few basic geometric shapes. The combination of these shapes and the vibrant colours produces some interesting pieces. I really like them and think it is striking enough to make the viewer want to dismantle all the geometric components and examine them as individual parts.

The still image above is a view of what you would see once you have generated the design as the user (click the image to have a go). Relyea uses Shockwave applets to present his work. It is usually in the form of an interactive project and requires the user to take an initial action. For examle when the user clicks on the red blank box the design quickly starts printing itself from the top left corner all the way around the box in a clockwise spiralling motion until the whole box is covered with the pattern.

Relyea has variations of these pieces – some even allowing you to choose the combination of colours and the randomness of the generation of pattern. See the Space Filling Curve Art Generator

The technical background to his work is explained on his site. Here is an excerpt from the Artist Information page:

Relyea’s tools are script editing windows and compilers. Relyea’s schooling in traditional printmaking (under Lawrence Scholder) left him with a strong consideration for the process of image creation. Relyea loosely defines new digital processes by creating works manually first, he then transforms the processes into programming routines with parameters. The parameters can be dynamic data from the network, mathematical algorithms or number generators. The routines are repeated with parameter variations to generate designs of similar aesthetic quality.

I think I might try contacting him and ask him a few questions about his work and how much of it he considers to be influenced by the world of geometry. hmm wonder if he’ll reply – will keep you posted.