Powered By Blogger

Wednesday 1 June 2011

Here are the ingredients required for each drink :)


Mocha Ingredients
1 ½ cups cold coffee
2 cups milk
¼ cup chocolate
¼ cup white sugar

Tea Ingredients
½ a teaspoon of tea leaves
1 cup of hot water
a dash of milk
sugar - as per taste

Falling Water Ingredients
45ml 42 Below Feijoa vodka
100ml CH'I herbal mineral water
cucumber slice
ice

Gin and Tonic Ingredients
2 oz Gin
5 oz tonic water
1 lime wedge
ice

Tequila shot Ingredients
45ml Tequila
1 lemon wedge
salt

Absinthe shot Ingredients                       
45 ml Absinthe
1 sugar cube
fire

The list of ingredients reinforces the idea that a setup function contains specific amounts and boundaries/outlines of what each segment within the function is. For example, Size could be defined as (500,500) and the amount of alcohol could be defined as 45 ml. In addition different code require different size, just like how different drinks require different amounts of alcohol. This is why I have provided several different types of drinks to indicate the fact that different types of code require different types of initialisation, like different drinks require different types and amounts of ingredients.





Monday 30 May 2011

Final Arrangement and Explanation

ส่วนประกอบ
-Ingredient (Thai)
Final Composition - for exhibition
The Photo's arranged in this way are much more appealing to the eye. The way it references the set up code is also one of the attractions toward this presentation format. Each ingredient is laid out one above the other like you would find in the "void setup" function.



This series looks at representing a function in OpenProcessing code called Void Setup. The setup function is a part of the code that contains the information needed to carry out the ‘action’. The code needs to have this information established and laid out in order for these ‘actions’ to be conducted.
Metaphorically speaking the setup function to the code is what the ingredients are to a cake. Or in the case of this series the ingredients to a drink. Without these ingredients the drink cannot be produced. Equivalently without the items found in the setup function, the code cannot create the desired end result.
The setup function includes items like background, colour, speed and size. All items that need to be defined for the desired end result. In my photographs I have explored items needed in order to create the desired drink.

In the first two images the focus is on hot drinks. The first looking at a Mocha and the second a cup of Tea. 

The next two photographs in the series are alcoholic mixers, a Falling Water Cocktail and a Gin and Tonic. 

In the last two images of my series I decided to look at shots, a Tequila shot and an Absinthe shot. 

The exploration of different elements and different requirements for each drink speaks metaphorically of how codes require different setup functions according to what they are trying to achieve. This was my overall intention behind the series. Enjoy.

Thursday 26 May 2011

Final Shoot - Decisions.

Below is a series of photo's that will be used towards my final compilation...

 Milo

 Mocha

 Tea

 Falling Water Cocktail

 Gin and Tonic

Tequila Shot

Absinthe Shot

Each of the drinks are great however I feel the series is too long and I think some of the photo's aren't at the same standard as the rest. I think that having 2x shot drinks, 2x alcohol mixers and 2x hot drinks would make a good series. Meaning that I would remove the Milo image. And arrange the set of two one above the other with the couples side by side. 

Wednesday 25 May 2011

Last week's work...

Last week I did some initial photo's after brainstorming what I wished to photograph.

Below is a list of some of the 'actions' I came up with that I can use as a basis for my series of photographs.


  • Running
  • Baking a cake
  • Having a shot of tequila
  • Playing Poker
  • Going out
These images came out well and when I went to edit them in photoshop the best framing for the photo's was in a landscape frame that was extended width wise. A few examples of what I came up with are below...




Once putting these images together I found that as a series they didn't quite flow as well as I may have liked. Therefore I have made the decision to reshoot and focus simply on the ingredients needed for several different types of drinks. Focusing on the successful tequila shot and moving with that idea.

Below are is a brainstorm of the drinks I wish to photograph the ingredients to...
  • Tea
  • Coffee
  • Milo
  • Gin & Tonic
  • Martini
  • Absinthe shot


Monday 16 May 2011

Cost/equipment Plan

Only cost I will have to be concerned with is the printing of the images. As the objects required in my photographs will all by items that I can borrow and find around me. The Big Picture does student discount, and are very reliable. Depending on the size of the images the cost should not be out of my price range.

Time Management Plan

With a Media Studies take home test due in the same week of this assignment, as well as a final Industrial Design project that will be ongoing, it will benefit me to follow the outline below:

This week:

  • Brainstorm what actions I wish to represent in my series. This will define the amount of images and also let me know what ingredients or objects I will require when I shoot the series. 
  • Gather objects that are required in the shoot, and sketch out how these objects will be arranged in the image (following the precedent images as inspiration)
  • Do a first shoot, looking at lighting, arrangement of space, image size etc
Next week:
  • Edit the photo's from last week down and refine in photoshop. Identify what needs to change in the second shoot. Identify what size images would work best as a series (portrait, landscape, square etc)
  • Do a second shoot, and again edit and refine.
  • If needed do a final shoot.
  • Decide on image sequence, Look at photos as a series and edit to ensure the images flow as a series. Decide on how the images will be mounted in the exhibition.
  • Print draft images see how they look.
  • Write 200-300 word description of the photographic series. Due on Friday.
Hand In Week...

MONDAY
  • Print final images (@ The Big Picture, Aro St) and mount in presentation format.
TUESDAY
  • Ensure photographic series is up in the atrium by 1:30 pm.

Precedent Images - provided by Emily Steel

These images are from the todayandtomorrow blog, Carl Kleiner photographed the recipes meanwhile Evelina Bratell Styled the ingredients.






Project Three - Possible Programming Terms

First concept:  Based around the term Loop()

  • My medium to explain this term would be a video clip. Where I would explore day to day things in life that repeated an action over and over.
  1. A treadmill track.
  2. A microwave dish etc.
However I felt that this was far too straight forward and not creative enough so I looked at trying to take this metaphorical approach to a higher level.

Second concept: Based around the term Void Setup
  • Here I would explore the components in setup through a series of images.
  • Each image would explore a metaphor for the setup function. For example...
  1. Ingredients and method to a baking cake,
  2. Objects required to make tea or coffee,
  3. Objects needed in order to play a game of poker.
This takes the idea of set up and explores the function creatively and clearly. Making clear that the setup function is basically all the 'ingredients' that are needed in order for the code to work. It holds the information that will be needed in order for the action to take place.

I have taken this key word action and brainstormed some ideas above of how this could be metaphorically represented with 'real life' actions.

Third Concept: Taking the second concept further (Void Setup) 
  • Thinking of the images as a series I could focus separately on each key component that is generally found within the setup function. Like: Size, Speed, Background, Color, Line etc.
  • Thus creating a series of images that look at each look at a single component rather than an action like I was doing in my second concept.
At this point both my second and third concept are appealing to me. However after a look at some precedent images (provided by Emily Steel) I am starting to like the second concept more so than the third. As it means I can get quite creative with arrangement, space and use my photography skills to present a polished exhibition piece.

Thursday 14 April 2011

Referencing Sound

My wind sound clip came from TheFreeSoundProject which is a creative commons site. It is a .wav file and loops seemlessly. :)

Final Code - Transformation

// Import Sound Library
import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;

Minim m;
AudioPlayer mplayer;


// Import image for background.
import processing.pdf.*;
PImage img;


// Number of circles being drawn in each frame of the animation.
int N = 450;
Particle particles[] = new Particle[N];


void setup(){
  size(500,500);


  m = new Minim(this);
  
  // Image being used in background (because I did not like the previous gradient palette being used)
  img = loadImage("http://2.bp.blogspot.com/_wb8bAl1P-N0/TOFKkD6iQII/AAAAAAAARyQ/mmGzMbjvVrk/s1600/blue-sky.jpeg");
  img.resize(width, height);
  background(img);
  
  createParticles();


}

void draw(){
  
//This prevents the sketch from building up and redraws the animation each frame
  for(int i=0; i<width; i++){
     image(img,0,0,width,height);
     line(0,i,width,i);
  }
   


 //Defines class Particle and it's objects being drawn.
 for(int j=0; j<N; j++){
      particles[j].move();
      particles[j].mouse();
  }
  
}

void createParticles(){
  
   // This creates the "particles" for each frame


    for(int i=0; i<N; i++){
        particles[i] = new Particle(random(width), random(height), int(random(100)));
    }
  
}



class Particle{
// This is a class, which contains a composite of functions and data.  


    float x;
    float y;
    int s;
     
     Particle(float _x, float _y,  int _s){
        x = _x;
        y = _y;
        s = _s;
        
    }
     
    void move(){
      
        // This is where the movement of the circles across the screen is defined


        x += random(6);
        y += random(5) - 2;
         
        if(x<0) x = width;
        if(x>width) x = 0;
        if(y<0) y = height;
        if(y>height) y = 0;
        
    }
    
    void mouse(){
   
    // This is where the mouse interaction is defined.


     if(mousePressed){
      
        smooth();
        noStroke();
        float dia = dist(x, y, mouseX, mouseY);
        dia = constrain (dia,0,150);
        fill(240,random(10,15)); 
        ellipse( x, y, dia, dia);
     }
     else {
     
       // This is where the animation is told to continue if the mouse is not pressed


         smooth();
         noStroke();
         fill(240,random(10,15)); 
         ellipse( x, y, 150, 150);
     
      }
    }
}




void mousePressed(){
    //This Function starts the wind sound (at the same time of the void mouse() function and then loops it so that the sound continues infinitely.
       mplayer = m.loadFile("wind_final.wav");
       mplayer.loop();


}



Below are a couple of screen shots of the interaction...


Sound.

Sound proved to be more difficult than I had anticipated. Spent most of the day working on simply getting a code from OpenProcessing to work when I ran it on my laptop and not through the website. I was able to identify the problem when I looked up minim sound code through the site "Code Log". This made me realise that the URL I was attempting to use must not have been linking to the sound itself. I also found that if I were to use a file upload then I would need that file to be in the correct folder in order for the code to find the sound and use it.

The code that I used as a main source for my own sound input was one by Cameron Greatorex that looked at sound initiated by the click or press of a mouse button. I used his code (Click to see) involving sound for the initiation of sound to coincide with the initiation of movement in the sketch. This required some alterations to his sound code, and also meant I did not have to use all of his sound code.

On a side note, I decided that I wanted the wind noise to continue and not stop and start with the clicking of the mouse, which clears the cloud away. This is because of the cloud movement across the screen, I feel that this movement should be backed with the sound of wind.

I had to make changes to the particle class, in the void mouse() function, due to the fact that I wanted the clouds to only separate when the mouse was pressed. But wanted the animation of clouds to continue when the mouse was not pressed. This was pretty straight forward stuff after all, and I was surprised at how far my coding knowledge has come :)

Wednesday 13 April 2011

Background fixed :D

Luke and Ben R put me into what was happening in the draw function, I was still using Funatti's palette code which was riding over my background (which was only being drawn in the first frame). Ben suggested I use image in the loop or erase it all together and let the sketch build up. I did not want the latter at all, so played around with image in the for loop, and managed to get the background to draw every frame :)

Changing the code to work in my favour.

Funatti's code is great but I wanted to make it my own by changing the quality of the background, as the previous background has lines and colour that I did not like.

  • I am working on using the import image process that worked so well in my previous wallpaper code. and using that as my background.
  • In doing so I ran into the problem of having to resize, I looked this up in the reference and was able to successfully resize the image to the dimensions of my application.
  • However Now I have the issue of the background flashing in the first frame of animation then completely disappearing altogether. I have a feeling this is because of the class function that I am using but it is a bit out of my depth so I am seeking help from tutors at this point.



The other aspect I am looking to change in the code is the interaction.

  • I have looked at getting rid of functions that I will not need due to the mouse function that will have this information in it already. I have deleted void draw in the class and replaced it with void mouse, which draws the shapes and also alters the shapes according to how far away the mouse is.
  • Next I was unhappy with how big the circles got when the mouse was so far away. So Luke informed me of a constrain tool, which is incredibly simple and straight forward! :) So slotted that in place.


Another observation I made was when I switch the code to P2D, the animation slows down considerably and doesn't seem to cope, I thought that in switching to P2D this would help with the background image and the general run of the code, but I am not entirely sure I have defined it in the right area(s) or I have a feeling I have two opposing definitions for what the background should be.

NEXT STEP: To add sound that links in with the interaction of the mouse.

Monday 11 April 2011

Found new code for moving clouds!

Funatti has a code that explores a cloud scene that is very effective and I would like to focus on his code due to the way he creates movement of cloud forms across the screen. You can find the original code HERE.

Below is part of Funatti's code that explores a 'class' - A class is a composite of data and methods (functions) which may be instantiated as objects. As I found out through the Processing Reference, and Luke & Ben.

class Particle{
    float x;
    float y;
    int s;
    
     Particle(float _x, float _y,  int _s){
        x = _x;
        y = _y;
        s = _s;
    }
    
    void move(){
        x += random(6);
        y += random(5) - 2;
        
        if(x<0) x = width;
        if(x>width) x = 0;
        if(y<0) y = height;
        if(y>height) y = 0;
    }
    
   void draw(){
        fill(255,15);
        noStroke();
        ellipse(x,y,s,s);
    }
}



The above relates to other parts of the code that have created "particles" and array's . However what I am interested in is the void move() function. As this is where the movement of the circles across the screen comes into play. Note being: the class function will be helpful in the interaction of the mouse with the circles and their radius length. As I will be able to create another function within the particle class labelled "void mouse()" which will describe the interaction of the mouse with the clouds (ellipses) being drawn and moved.

Thursday 7 April 2011

First concept of transformation.

Below is my code for a very basic looking cloud scenario...


[Inspired by David Bouchard on OpenProcessing, who used array's to store data. **Click Here** to see the source of inspiration.]


PImage img;



float x[] = new float[250];
float y[] = new float[250];

void setup() {
  size(500, 500);
 
  img = loadImage("http://www.freefoto.com/images/9907/04/9907_04_20---Blue-Sky-and-White-Clouds_web.jpg?&k=Blue+Sky+and+White+Clouds");

  smooth();
  noStroke();

  for (int i=0; i < x.length; i++) {
    x[i] = random(width);
    y[i] = random(height);
  }
}

void draw() {
 
  background(40,75,155,100);
 
  for (int i=0; i < x.length; i++) {
   
    smooth();
    int a=floor(random(0,img.width));
    int b= floor(random(0,img.height));

    color myColor = img.get(a,b);
   
    float dia = dist(x[i], y[i], mouseX, mouseY);
    fill(myColor,random(1,45));
    ellipse(x[i], y[i], dia, dia);
  }


}

Concept sketches for day scene



The sketch moves according to the mouse position. 'Cloud' like forms will move away from mouse and sounds like wind and possibly tweeting noises will be made at the click of a mouse.

Thursday 31 March 2011

Refining concept for Project two and Array's

After today's presentation, I have decided to just stick with the one transformation scene of the sky, however if I have time (and the coding ability) I will take two different approaches to the same scene, stormy night (lightning etc) and sunny day (birds etc). Sounds and visuals can be explored to a great extent here, and will have to be if I am to make the transformation effective and 'stand out' amoung the rest. The visuals have a good chance to be quite interesting and the interaction with those visuals could effetcively highlight this.

 After looking up array's in the Reference. I'm thinking these could be very helpful in the manipulation of clouds in the day scene and the manipulation of lightning in the night scene. Fingers crossed I can achieve both scenes, with a high visual standard.

Project Two - Transformation

This project will be focusing on interaction with visuals and the creation of sound. I have been browsing many sketches on openprocessing to give some ideas on where to start. I am keen to go back to my initial brainstorm for wallpaper one and work on some key words from that, such as natural, organic, flowing. In taking these key words I am looking at the visualisation of a natural situation, for this reason I will be taking inspiration from nature, using shapes to create scenes such as the sky, green grass, the sea etc.

Depending on my coding skills I may not end up creating all of these different scenes. But so far I have been thinking about creating the sky scene with clouds (built up with different sized circles of alternate transparencies). The interaction will then come from the action of clearing the cloud away. A code I found on OpenProcessing explores the relation of the mouse to the circle and the radius changing according to the distance the mouse is away from the centre of the circle. See below :)

Click Here for link to the code that explores the above concept.

Monday 21 March 2011

Reflection and Goals for next time.

Project one went well as I was able to manipulate a code to the extent where it become my own.

What really helped me in this project was experimenting and changing values to identify what their function was. By changing the code then visualising the result in the sketch I was able to learn about code. After todays lecture this was determined again for me when I saw that I used the right hand side of my brain. The visualisation showed that some people can see the woman turning both ways, I could only see the figure turning clockwise, meaning that I am primarily visual and need picture to learn about code.

Goals for next time...
- After the guest lecture I thought it might be beneficial to start from scratch. To begin with somehting simple and build on it, could be very helpful for me to work on with the second project on Transformation.

Final Wallpaper Four

This Wallpaper explores triangles drawn at random in a certain area within the canvas (1x2). Again using an image to determine the colour used to fill the shape and where the colours are situated on the wallpaper. Below is the image I used for the wallpaper.













Below is my final code:



import processing.pdf.*;




PImage img;
float cameraX,cameraY;

void setup(){
  size(500,1000,P2D);
  img = loadImage("http://fc01.deviantart.net/fs42/f/2009/165/5/f/Purple_Pink_Sunset_by_boaz_rbg.jpg");


  beginRecord(PDF, "wallpaper_4.pdf"); 
  background(0);
   
}


void draw (){


  camera(-100, 50, random(-500,800), width, height, 1, 1, 1, 1);

  println(cos(cameraX));
    
  int x=floor(random(0,img.width));
  int y= floor(random(0,img.height));
    
  color myColor = img.get(x,y);
    
  stroke(0,5); //Decided to include a thin outline to the triangles to define them and reference the shape used.
  fill(myColor,10); //Transparency is 10 in order to build up the picture over time and blend the triangles, creating a soft look.
  triangle(x,y,x,random(50,950),random(-200,0),random(50,950)); //Triangles have been told to be drawn within the middle section of the sketch.


}
  
void keyPressed(){
  endRecord();
}

Final Wallpaper:

Final Wallpaper Three

Here I have used rectangles to explore an image and the colour within that image (below).

Again the wallpaper has only taken a section of the image to draw from resulting in the distribution of colours being different to the original image itself.













The code below is again similar to the previous codes, but with the change in image and shapes being drawn, the result is rather unique.


import processing.pdf.*;




PImage img;
float cameraX,cameraY;

void setup(){
  size(500,1000,P2D);
  img = loadImage("http://www.testq.com/nfs/testq/photos/0000/6021/landscape.jpg"); //Different Image


  beginRecord(PDF, "wallpaper_1.pdf"); 
  background(0);
   
}


void draw (){


  camera(-100, 50, random(-500,800), width, height, 1, 1, 1, 1);

  println(cos(cameraX));
    
  int x=floor(random(0,img.width));
  int y= floor(random(0,img.height));
    
  color myColor = img.get(x,y);
    
  noStroke(); //No outline for a smoother transition between colours.
  fill(myColor,50); //Transparency of 50 to create a clearly defined rectangle, however still allowing for build up.
  rect(x,y,random(10,450),random(10,80)); //Rectangle shape being drawn to the values of the image and within a certain dimension so as to make sure there are no huge rectangle being drawn and keeping with a largely horizontal sketched view.



}
  
void keyPressed(){
  endRecord();
}


Here is the final result:

Final Wallpaper Two

This wallpaper explores quads that look to be lines. With an image (below) that explores orange and yellow tones of colour, with hints of the red to reference the previous wallpaper.











Below is my final code for this wallpaper (noted are the changes made to the code from previous wallpaper):


import processing.pdf.*;




PImage img;
float cameraX,cameraY;

void setup(){
  size(500,1000,P2D);
  img = loadImage("http://999images.com/wallpapers/orange-leaf-dew-drops-1366x768.jpg"); //Different image being imported.


  beginRecord(PDF, "wallpaper_2.pdf"); 
  background(0);
   
}


void draw (){


  camera(-100, 50, random(-500,800), width, height, 1, 1, 1, 1);

  println(cos(cameraX));
    
  int x=floor(random(0,img.width));
  int y= floor(random(0,img.height));
    
  color myColor = img.get(x,y);
    
  noStroke(); //No outline because I wanted the quads to appear like rays and explore line in a softer way.
  fill(myColor,10); //I've made the transparency 10, in order to build up the sketch in the corner and fade it out to the edges.
  quad(y,x,random(10,20),random(20,30),random(10,20),random(20,30),random(10,20),random(20,30)); //Quad has been made to be drawn at random but in very restricted dimensions.
  smooth();
}
  
void keyPressed(){
  endRecord();
}

The result is as seen below:

Final Wallpaper One

With this wallpaper I explored the ellipse shape and imported the image of a rose below in order to get a nice distribution of red and black across the image.

What is important to note is that the code is only reading part of the image, because of the 1 by 2 size I have set my code to animate in.








Here is the Final Code in dark blue. My notes are in red.


import processing.pdf.*; // Saving as PDF command




PImage img;
float cameraX,cameraY;

void setup(){
  size(500,1000,P2D); //Here is the size of the canvas, and the dimension of the sketch: 2D
  img = loadImage("http://images.psxextreme.com/wallpapers/ps3/red_rose_01.jpg"); //This is where the URL of the Image I have decided to use is imported. 


  beginRecord(PDF, "wallpaper_1.pdf"); // Saving as PDF command
  background(0);
   
}


void draw (){


  camera(-100, 50, random(-500,800), width, height, 1, 1, 1, 1); //Camera had a lot more of an effect in the P3D images.

  println(cos(cameraX));
    
  int x=floor(random(0,img.width));
  int y= floor(random(0,img.height));
    
  color myColor = img.get(x,y); //Gets the colour form the image imported.
    
  stroke(0,5); //Here I have decided to use a stroke around the object, to ever so slightly define the shape being used.
  fill(myColor,random(1,20)); //The random colour sample from imported image.
  ellipse(x,y,random(0,400),random(0,40)); //The ellipses being drawn from the image width and height and at random across the canvas dimensions.
  smooth();


}
  
void keyPressed(){
  endRecord();// Saving as PDF command
}


Below is the final Image from this code (after a certain amount of animation and stopped when the image had built up to the standard I was happy with)...

Sunday 20 March 2011

Experiment. Experiment. Experiment.

After exploring the code using camera's and 'image import' some more, I have realised that I am able to create images that are very different form one another by simply changing the shape in the draw loop, and by changing the image which the code gets the colour information from. This results in a set of four wallpapers that look as one (as in a series that explore the same theme) yet also differ from one another enough so that the each wallpaper is interesting in its own way.

I have decided to use colour, because the black and white wallpapers have no where near the amount of visual interest as the colour ones. I also found that the black background compliments and frames the coloured shapes much more successfully than the white background.

Shapes and more shapes. With each shape (ellipse, quad, rectangle, triangle) I was able to manipulate the sketch in different ways in order to get it to build up an image that explores space in a new and exciting way. I found that the 'import image' function held more information than I initially realised, as it explores the arrangement of colour in the image being imported and replicates that arrangement (to a certain extent) in the wallpaper. I used this to my advantage, by creating wallpapers that relied on the image for the arrangement of space (and colour).

In my skecthes I used the shape's coordinates to my advantage by manipulating how the shape was drawn on the wallpaper, looking at concentrated areas and blank space. This means that my series has explored many aspects of the code, but has produced images that are unique from one another.

Can't save PDF in P3D sketches!!!!

Unfortunately it has proven rather impossible to create a high resolution PDF from the P3D sketch function that I have been using. This means I will have to use P2D instead of P3D, which will result in images that do not have the depth and complexity as before. However, the P2D images still manage to explore my concept very well. After Loads of experimentation I have begun to shape my four wallpapers into a series that all explore line weight, depth, contrast and space arrangement.

Thursday 17 March 2011

Sketches and Concepts from first presentation


These first two images are my brainstorming and narrowing down of ideas for the four wall papers. Looking at the basic techniques and tips we are taught when producing visual representations.

The sketches below are my representations of my concept and theme: Contrast, Space Arrangement, Line weight.












































While I like the direction I am heading I feel like I want more complexity to some of my sketches yet still show simplicity.

My concept is based around the first year experience (that I remember) and therefore I almost want my skecthes to take on a journey of their own. From left to right I want the images to show an increasing complexity and elegance. Looking at some of the rules and processes I went through when undertaking my firts year of Design Innovation.

Starting with basic line drawing and getting to know the drawing tools as one of the first "experiences" I had in the first year design studio, means that I want the first image to represent something very similar to the first sketch (see above, horizontal and vertical lines). I really like one of my previous codes that experiments with ellipses, and would like to use this as my first wall paper design but with a lighter line weight. The reason I like this image is because (with a lighter line weight) the sketch builds up to create areas of built up thicker looking line weight and creates this idea of contrast as well as creating points of interest (space arrangement).

For Example...




However after the skecthes I have just been creating with the 3D aspect and use of camera's... This image does not stand up to or along side that sketch in any way.




So a way of getting around that is to play with and produce alternatives to the code using cameras, by using different shapes and possibly looking at either overlaying this pattern to the other code. Or else take a different perspective and use line (in the place of shapes) to attempt the same sort of reaction.

Changing and understanding code

After Tuesdays tutorial I realised that although I understood parts of the code I still didn't know how the camera function worked at all, or how I could change the code to only animate for a certain length of time. After being taught about for() loops and discussing with Luke my options, I soon gathered that I could make the code animate for a certain amount of frames before stopping, by using a for() loop. Exciting!

In addition, after Fridays tutorial I found that I could take a snap shot of the animation and save this as a PDF. However I still plan to use for loops as they allow me to alter the image in ways I hadn't expected.

Saturday 12 March 2011

Experiments with code for my Wall Paper concept.

The following code is one I found on OpenProcessing. It took my interest because of the horizon point angled across the middle, which linked into my theme of arrangement of space.


PImage img;
 
void setup(){
  size(400,400,P3D);
  img = loadImage("art.jpg");
  
  background(0);
  
   
}
float cameraX,cameraY;
 
  void draw (){
    
     
    camera(-100, 50, random(-300,500), widthheight, 1, 1, 1, 1);
    cameraX = radians(map(mouseX, 0, width, 50, 0));
     cameraY = radians(map(mouseY, 0, height, 180, 0));
      println(cos(cameraX));
    
    int x=floor(random(0,img.width));
    int y= floor(random(0,img.height));
    
    color myColor = img.get(x,y);
    
  stroke(0);
  fill(myColor,100);
 rect(x,y,random(20,200),50);
  }

Which looked like this...


I made some changes to the code to remove the black lines around the shapes. Also changing the rectangle to an ellipse. and importing different images from the net to get the colour transition I wanted.

PImage img;
 
void setup(){
  size(375,750,P3D);
  img = loadImage("IMAGE>FROM>NET");
  
  background(0);
  
   
}
float cameraX,cameraY;
 
  void draw (){
    
     
    camera(-100, 50, random(-500,800), width, height, 1, 1, 1, 1);
    cameraX = radians(map(mouseX, 0, width, 50, 0));
     cameraY = radians(map(mouseY, 0, height, 180, 0));
      println(cos(cameraX));
    
    int x=floor(random(0,img.width));
    int y= floor(random(0,img.height));
    
    color myColor = img.get(x,y);
    
  noStroke();
  fill(myColor,50);
 ellipse(x,y,random(10,500),80);

The following were some of the results..



The following was a black and white image. As I am still tossing up between using colour or not. My concept does not call for colour and could work better without any.