Thursday 22 April 2010

Conclusion.




So our project works, and we are very proud of it. We set out to explore stonehosue in a different and advanced way, and i think we've been successful. Everything we wished to include in our project we have succeeded in doing so. Whilst there are some things we could have built better upon such as a more complex animation, overall our group has done well to achieve the final product. I feel the technology we have used has been interesting and intriguing to use, and very cost effective. 

Personally i have to admit that considering that when i started this module i was confused and baffled as to how we would achieve what we have or even what we were really trying to do in the Stonehosue area, but now i see clarity in the use of different forms of technology and my way of thinning has changed significantly when approaching creative assignments such as this, something i think this module try s to gain from us students.

As a final thought i do hope to take our project down to the Dance Academy to promote the building itself as i do hope something is done with a building with a rich history. 







Monday 19 April 2010

Frustration, sucess and animation.


First things first. I wanted my tornado (ellipses) to start off at a certain point so to do this  i declared 3 floats as mentioned in a previous post, i then gave these floats the value of 255,which is the location on the xy scale where they would start.


float z = 255;
float x = 255;
float y = 255;


and the stroke was simply done


stroke(#d504ff);


I then realised that i should construct my animation itself. Meaning what did i want to happen depending ont he wind speed. I looked at the data and saw it was in this mathematical format 3.12. So i was going to use the whole number for my animation, which meant using an IF statement.


int q = int(title[i].getContent().charAt(0));
int w = int(pubDate[i].getContent().charAt(1));
int e = int(value[i].getContent().charAt(2));


I used 3 random letters so that i could use the value of q, which was being pulled in through the xml feed.


so i started with...


if (q <= 210) {
text ("Windspeed is slow, have a nice day! ", 80, 200);


else {
text("Windpseed is high! Take it easy out there!", 50, 150);


Now came hours of research and tutorials..


fill(x,z,y); - This fills my ellipses with colour.
stroke(#d504ff); - this gives it the pink storke outline.
Two very simple lines for code.
ellipse (abs(x+=9*cos(z+=.5-noise(i++)))%L,abs(y+=9*sin(z))%L,40,40);
However this mean looking line required lengthy tutorials via www.learnprocessing.com and www.processing.org.




So using this code it moves the ellipses around the sketch. Ive revised the functions used in this line of code and I do understand why they are sued and what they are for however I dont think id be able to write it off the top of my head. Still in gives me the effect I wanted in my processing. However to get it to move in certain ways I have to change the values of x,y, and z in my IF statement.


text ("Windspeed is slow, have a nice day! ", 80, 200);
z = z - 1;
x = x - 1;
y = y +1;
}
else {






text("Windpseed is high! Take it easy out there!", 50, 150);
x= x - 5;
z = z - 8;
y = y + 5;


}


The numeric values are random numbers I chose, this proved to be very temperamental as the slightest change in the number can result in a completely different animation, as it changes how and where the ellipses fall. It also changes the speed of which they move around the screen, I simply did trial and error with this values till I found an effect I liked for both parts of my IF statement.


Lastly I thought I would explain this..
filter(18);
filter(11);
The filter function is a very artistic function and gave me the wave/ripple/cloud effect when the ellipses move. It distorts the image or in my case my ellipses to create a tail of colour. The numeric value of filter can also be very temperamental however this is a good thing as it makes for very varied animations, and I think it matches my specification perfectly.


So conclusion? Im proud of my work. At the start i hated processing and could not get to grips with it. However tutorials like with most things are a god send! The process was frustrating as I had to learn further before I could really start my sketch, when I just wanted to get it done. There is obviously a lot I still dont understand but I feel through this assignment ive covered the basics and more. As a note its much easier to sign the applet on a mac terminal window as opposed to windows CMD. This process was made simple thanks to Chris saunders. As well as Chris a big thanks goes to www.learnprocessing.org as it has been a huge help!

My processing sketch is available on http://busy-signal.co.uk/processing.html


The setup!




In my setup i knew i wanted to declare a background colour and use a custom font.


Declaring background colours is a simple task and requires one line of code. Using a font however is different.


void setup() {
PFont font;
font = loadFont("StormExtraBold-48.vlw");
textFont(font, 32);
text("word", 15, 50);
textSize(14);
text("word", 15, 70);
smooth();
size(400,400);
background(#77b2f5);

 Here is my setup. In this code i have imported a font that i have installed via dafont.com, and after declared its size/scale and declared where on my 400 x 400 sketch i want the text to appear! So at this point my sketch was importing data from the XML feed, and the setup of my sketch was complete. Now came the hard part the animation!

Wednesday 14 April 2010

The sketch takes shape!


Before i started to design my sketch i penned down a few visual targets...



  1.  Use colour scheme of my website (www.busy-signal.co.uk) to great effect.


  2. Have a personal message for each condition of the wind speed. i.e if the wind speed is high display " High wind speed ".


  3. Use a series of ellipses to circle each other creating a wind over the sketch
Numbers one and two were very simple, i learnt i could include colour references inside processing e.g. background(#77b2f5), very simple!


However number 3 was the hard part. It required the use of tutorials, new functions and a cheeky bit of curve making.


Here is my starting setup ..
import processing.xml.*;

XMLElement xml;
XMLElement[] title;
XMLElement[] pubDate;
XMLElement[] value;




void setup() {
frameRate(10);
smooth();
size(300,300);
background(#77b2f5);


String url = "http://x2.i-dat.org/archos/archive.rss?source=bms_.WindSpeed";

XMLElement xml = new XMLElement(this, url);
title = xml.getChildren("channel/item/title");
pubDate = xml.getChildren("channel/item/pubDate");
value = xml.getChildren("channel/item/description");

}

Now obviously one ellipse rotating is not going to look good or look anything like a tornado so i decided to use 3, which means declaring 3 float variables an assigning each ellipse a different id.


float z = 255;
float x = 255;
float y = 255;


I knew i had to have an if statement to give two or more different experiences of the sketch depending on the wind speed, but the hard part was trying to figure out how to make the circles rotate and move across the screen.




Change of idea and XML!


After messing around with a few simple sketches i decided not to bother with "bms_.OutAirHum" from the RSS feed. I looked over the course of 5 days and saw that it doesn't change much. So instead im going to use "bms_.WindSpeed" which does change considerably.


I found importing this to processing was no difficult task by using this code...


import processing.xml.*;


XMLElement xml;
XMLElement[] title;
XMLElement[] pubDate;
XMLElement[] value;

followed by this in the setup...


String url = "http://x2.i-dat.org/archos/archive.rss?source=bms_.WindSpeed";
XMLElement xml = new XMLElement(this, url);
title = xml.getChildren("channel/item/title");
pubDate = xml.getChildren("channel/item/pubDate");
value = xml.getChildren("channel/item/description");

To see if the data was entering processing  i used the "println" function so that i could view the data in the output window. Great that was all working, now the hard part what to do with this data?


So i wanted to make my visualisation a bit more advanced. Something cool to look at. However my processing knowledge DID lack. However this site http://www.learningprocessing.com/     has helped me and im sure many others with this assignment.


My idea in my head was simple, create a tornado in processing! The hard way of doing this would obviously be a mass particle swarm turning and changing in speed depending on the windspeed.

The easy way? a series of ellipses turning close together, making it also look like a fan on a A/C unit.

Monday 12 April 2010

Spit and polish!


well its finally done!
www.busy-signal.co.uk

 As you can see the twitter API widget now works . Its frustrating that i spent a good 2 hours scouring my code as to why it wasn't working but all it needed was the crossdomain.xml file placing in the root directory and the html file in the same folder as the .swf and .php files.( Thanks to luke mears for this)

The final design changes have also taken place merely by cleaning up my code in all html files and changing the design slightly but its now at a state to which im completely satisfied!

thirdly  my contact form now launches a mail client that the user has installed using this bit of code " action="mailto:benquinney1@googlemail.com" . Ideally i want a CGI script so that it sends straight to my email from the form im still in the process of learning how to do this, but it should be up and running.

Lastly Jquery has proven a struggle so im teaching myself it so that i can make a nice slideshow for my portfolio. Until then im working on a simple css/html based scrollable slideshow which will be online very soon. 

Sunday 11 April 2010

updates and security issues!


So they saying goes "your, your own worst critic" well its prove true because ive changed the design again.
see here....



  1.   The blog feed is no encapsulated in a rounded rectangle all thanks to new CSS techniques.
    "-moz-border-radius: 10px; -webkit-border-radius: 10px;"

  2. Ive got rid of all the unnecessary brushes i had in the background and created a more clean, simplistic layout in doing so.

  3. the header has changed slightly to match the layout and give a design feel

Im very proud of how its turned out, however flash is disagreeing with my plans.

Ive crated my own twitter widget see here...
 The three dark blue boxes are supposed to output my three latest tweets, and in flash it has worked perfectly.
However due to security issues in flash, i have to make my widget read twitter via a php file. This is where the problem starts. Every browser throws out this error
"Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://busy-signal.co.uk/twitter.php
    at Twitter_fla::MainTimeline/Twitter_fla::frame1() "
Apparently its due to my crossdomain.xml file not being in the root directory but ive fixed this and im still getting errors. For the moment im going to leave it alone as i fear i might throw my laptop in the bin if i proceed!


Lastly im in the process of working on a jquery sideshow for my portfolio, but Jquery is being jQUEER and refuses to work!









Friday 9 April 2010

update! 09/04/10.

So its been a hard few days with all the assignments going on. However i had had enough of looking at my website and not seeing my blog on it. obviously i needed to convert my blogger to wordpress but my web hosting "heart internet" has made this a harder task than it needs to be. It does support wordpress and mySql databases but makes the process of getting them on there a nightmare. So i decided to use feedburner to display the 15 most recent posts on my website, i also changed the blogger layout to match that of my website if the reader decides to explore my blog further.

Secondly my Facebook and Twitter have been syndicated allowing me to post across two platforms of social networking while only being logged into one! Making for a more fluid and singular online presence.

Lastly my website has undergone its final designchanges to a standard of which i enjoy and it now has a favicon in the top left corner of the address bar!

A very successful day....... in some regions!

/end success
}

I SUCK!

After looking at many examples of processing it would seem that to do anything worth looking at you need some UBER maths skills, of which i do not have.

Most of my ideas has failed to make the transition from my head to processing so its time to keep it simple.

I intend to have a singular ellipse moving around the stage to create a hazy smoke effect in its path. The more clear the view the less humid it is outside, and vice versa. Lets crack on!

Time to Visualize!


So it's time to crack on with the processing visualisation.


Using the ARCH-OS RSS feed i need to visualize the data in some sort of astehically interesting way! simple! well not really, for me but still ive got a lot of ideas.


Ive decided to pick this "bms_.OutAirHum" which im gathering is the outside air humidity.


The reason i picked this data source is because anything like rain, heat or wind speed is quite easily to visualise via the effect it has on the environment. The human senses obviously know if its hot, cold or if there has been a lot or little rain. Humidity however is less obvious so i chose to visualise this in a way in which we can easily see how humid it really is.

 Ideas?!

  1. Clouds or fog?

  2. A ripple effect creating some sort of mist

  3. a wave effect with a colour range ?

    well its a working progress.....