January 2013
10 posts
Echo Lake - Even The Blind Dead Berlin - Hipnosis Ombre - Tormentas Ssaliva - AVE Will Stratton - Who Will Jacaszek - White Wind Dance The XX - Fiction (Kid Smpl Remix) Black Sabbath - Planet aravan (Poolside Rework extended intro) Monomono - Water Pass Gari (Pts 1 & 2) Free Association - Purple Mikes Fela Kuti - No Possible (Joystick Jays Vu Remix)
4 tags
Finding the Centroid of Non Intersecting Polygons
I answered some questions on the Processing forum which led to me writing this small function to determine the centroid of a polygon it uses this formula to determine the position of the centroid, Cx and Cy:
where
it might be useful for someone.
class pPoint {
int x, y;
pPoint(int x, int y) {
this.x = x;
this.y = y;
}
}
void setup()...
5 tags
Gaussian Blur in Processing
imContinuing on with the image processing theme I looked at blurring an image. Gaussian Blur is similar to the Sobel edge detection algorithm insomuch that for each pixel you are processing it looks at the surrounding pixels to determine what change needs to be done. Each pixel becomes the average of the pixels around it, except that it is a weighted average, this means that the pixels closer...
4 tags
Edge Detection in Processing Using the Sobel...
Here is a quick run through of the code used to do an edge detection in Processing. First up I create an array that can contain all of the values of the screen intensities, place an image on the screen and load the image pixels into the system Pixels[] array:
int[] pixelarray = new int[width*height]; PImage img = loadImage(“image.jpg”); image(img,0,0); loadPixels();
...
7 tags
Edge Detection in Processing Using the Sobel...
I’ve been doing some experiments with altering colour values of digital images and video depending upon their initial values, this led me to looking into how edge detection worked, doing a quick web search led me to pages about the Sobel operator. Back in the mists of time I did a mathematics degree but after many years of not using any of the hard (or even easy) maths I was taught, I have...
December 2012
5 posts
5 tags
Translate, Rotate, Draw. (More Pushing and...
Experimenting a bit further with matrix co-ordinates, I realised that its quite easy to forget which order that you are supposed perform the order of things, so I (badly) drew an easy to follow diagram that shows me how to do it.
Step 1. The initial step, the matrix 0,0 co-ordinate starts at the top left hand corner of your window. If you are using more than one it is here that you will...
7 tags
Pushing and Popping
Being a bit lazy it’s taken me quite a while to work out how pushMatrix() and popMatrix() actually work and why I would need them. Whenever I have tried to rotate things around point before they’ve just gone whizzing off around the screen and in no apparent order whatsoever so I went off in a huff and did something else instead. Today I decided to sit down and actually see where I...
November 2012
2 posts
5 tags
Linked Lists in Processing
I’ve been playing around with using a linked list to create a slideshow in Processing. I know that in Java you can use the LinkedList item and methods to do this but I decided to experiment with using “pointers” (alright they don’t really exist in this language) to create the data structure myself.
It’s very stripped down and there is not error checking but the code...
October 2012
9 posts
This is a test post
September 2012
1 post
August 2012
3 posts
test
this is a test
July 2012
1 post
May 2012
2 posts
April 2012
1 post
March 2012
2 posts
February 2012
7 posts
Here’s another entry for the bus tops project, an asteroid clone, I ran out of time to give the poor bloke in the spaceship the ability to either shoot lasers or move so he is cast adrift and doomed.
http://www.openprocessing.org/collections/?collectionID=1337 http://bus-tops.com
This is my mix in honour of cheap holidays in Ibiza.
A small sketch that I quickly knocked up for the Bus Tops celebration of Processing.
Dedicated to the Open Interweb by Aram Bartholl
Music from Ben Frost, Adamned Age, BpOlar and others..
Aesthetics of sorting algorithms.
January 2012
14 posts
4 tags
(Screen) Splitting Video Footage
I suspect that there is a far more elegant way of doing this and it took me a while to work out why I kept bouncing over the array boundaries but this piece of code takes a video and splits into two separate (moving) images. Effectively it sends the data in the video file to two different parts on the screen.
import processing.video.*;
Movie splitMovie;
boolean newFrame = false;
int...
10 tags
7 tags
3 tags
Old Portable TV Simulator
Improve your low quality movie file downloads by playing them through me old Processing portable TV bad signal simulator. Wiggling the mouse gives you that feeling of fiddling with the indoor aerial to get a better picture. :)
Similar to the code below only using a video file to load the pixels.
import processing.video.*;
Movie myMovie;
boolean newFrame = false;
int window_height = 240;
int...