Month: October 2014

Processing: agents

In todays lecture we are learning about using agents.


float x, y;

float c;

^ declared variables
void setup(){
size(600,600);
x=100;
y=200;
c = color(22,222,222);
}

^ assignment

void draw (){
background(222);

x += random(-1, 1);
y += random(-1, 1);

^ update of variables
rect(x, y, 10, 10);
}

the updated variables can be put into their own voids:

void updateAgent(){

x += random(-1, 1);

y += random(-1, 1);
}

void drawAgent(){
rect(x, y, 10, 10);
}


Screen Shot 2014-10-31 at 15.40.27

The above classes code creates a small rectangle agent that floats and wiggles around the canvas. The below code creates wiggling agents at the point where the mouse is clicked. It also makes random coloured agents.

Screen Shot 2014-10-31 at 16.17.20 Screen Shot 2014-10-31 at 16.18.46

The workshop today fully explained everything from previous lectures and I feel that i understand processing a lot more. Although I’m still not comfortable with using the language to write by myself.

Processing, for loops, image processing and if statements

tinting images:

Screen Shot 2014-10-24 at 15.00.01Screen Shot 2014-10-24 at 14.59.46  Screen Shot 2014-10-24 at 15.01.49

getting to grips with for loops


int s=20;

void draw(){

for(int y =0; y<height; y=y+s){
for(int x =0; x<width; x=x+s){
rect(x,y,s,s);
}
}
}

This for loops creates a grid of rectangles to create pixels.

Pixels


processing tutorials for pixels:

processing.org/tutorials/pixels

Screen Shot 2014-10-24 at 15.35.41 Screen Shot 2014-10-24 at 15.43.51

using the pixelated image above, I used:

if (mousePressed && mouseButton== LEFT || key==’i’){
img1=loadImage(“car.jpg”);
} else {
img1=loadImage(“Chocolate.jpg”);}
}

to change the image to another image when clicked or by pressing the i button.

Text


Screen Shot 2014-10-24 at 16.18.05 Screen Shot 2014-10-24 at 16.17.57

Dystopia & utopia

Dystopia is a place that is unpleasant or bad and usually environmentally degraded. An example of dystopia would be “The Hunger Games” because it’s a situation opposite of a utopia. The films shows hunger and poverty which is something of dystopia.

Utopia is a place that is highly desirable or is a perfect world. In utopias, there is no war, disease, poverty, oppression, discrimination, inequality etc. An example of utopia would be “Meet The Robinsons” and “Back to the Future 2”

Design Fictions and Other Worlds Essay Idea

For the first essay, I have been set two types of essays. One is to write about a futuristic device within a film or tv show. The other is to design our own communication device and write about it. I am focusing on doing the second option. I have 4 ideas so far;
1) Create an alien world called Tellus, which is an alternate word for earth. Tellus would have it’s own language so they would be unable to communicate with neighbouring planets, so this device would enable that.
2) Baby communication device. The device would be in the form of a dummy so that it seems normal(nothing new to learn). The baby can then communicate with others around it without needing to cry. Problems with this device would be that if a baby used this device it would never need to learn to talk.
3) touchable hologram.
4) A device for two way prayers. The device will enable God and the person praying to communicate. The device would be worn around the wrist.

Workshop blogging

Making Houses


Screen Shot 2014-10-17 at 14.55.15

Experimenting with this code:

void setup(){
size(800,400);
background(0);
}

void draw(){
house();

}
void house(){

triangle(25,20,10,35,40,35);
rect(10,35,30,30);
rect(22,50,10,15);
}

Screen Shot 2014-10-17 at 15.06.21

using if loops to create rows of the house:

Screen Shot 2014-10-17 at 15.09.46

Screen Shot 2014-10-17 at 15.16.58

creating a colour array:

using square brackets means array!

Screen Shot 2014-10-17 at 15.24.39

used adobe kuler to find hex code colours to add to the code:

Screen Shot 2014-10-17 at 15.24.28

using the colour codes I chose:

Screen Shot 2014-10-17 at 15.29.36

Screen Shot 2014-10-17 at 15.29.42

rotating the rows, without a stroke:

Screen Shot 2014-10-17 at 15.51.09

Screen Shot 2014-10-17 at 15.49.04 Screen Shot 2014-10-17 at 15.48.51

image:

Screen Shot 2014-10-17 at 16.03.15

created using rotating houses and then using an ellipse which follows the mouse on the x axis.

using the code: if(mousePressed){save(“foobar.png”);};
I saved this image:

foobar

Poster Project, Dorset for Dorset.

For this project we were given the task to create an ‘independent dorset’ poster to display in the foyer in Weymouth house. On Thursday we are displaying our posters and asking people that walk past questions about the poster and if they noticed it.

At the start of this project we researched some information about Dorset. We also looked at some of the independent Scotland posters for inspiration. We looked at images for Dorset and found out that it has it’s own flag. From this we took inspiration to use the shape of Dorset and cover it with the flag. We also found out that Dorset is very touristy and agricultural. We also mentioned that there are a lot of homeless people around Bournemouth So we came up with the slogan “homes for the homeless, not for the tourists”.

poster1

Once we did our research we used A3 paper and marker pens to sketch out rough ideas as a group. At first we were struggling with images to use but decided on an image of Dorset cut out of England. Now that our idea was chosen we went away and photoshopped it.

Another idea was to create posters similar to the keep calm and carry on posters that were made for the British public in preparation for the 2nd world war. We had slogans like ‘keep calm and eat an ice cream’, ‘keep calm and visit the beach’, keep calm and walk the countryside’.

keepcalm

When we presented our poster idea to our seminar group we faced a few criticisms. We were first told that people may not know that the cut out piece of England would be Dorset. We were then told that our slogan could be seen as offensive. From this feedback we changed our slogan to ‘Dorset for Dorset, not for the tourists.” Which I think sounds better.

Processing

Processing is a programming language, development environment, and online community. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. Initially created to serve as a software sketchbook and to teach computer programming fundamentals within a visual context, Processing evolved into a development tool for professionals. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.

IMG_6108

In todays workshop I experimented with generative design. Generative design is a method to produce images, sound, architectural models and animations which are a set of rules or an Algorithm, normally by using a computer program. Most generative design is based on parametric modelling.

IMG_6106

First of all I created a simple draw tool which changed size over time, using the function x=(x+1)%50; it will continue to add 1 to the value of x until it reaches 49 and then the modulo function resets the counter to zero and then it starts again. I used different mouse clicks to create different colours using HSB (hue, saturation, brightness).

IMG_6112 IMG_6120

IMG_6116

Next, i experimented with if statements. I made a simple greyscale grid by using rectangles. After this I changed the colours of the rectangles to change randomly and then grow and shrink randomly (above).

IMG_6121

During the end of the workshop we were experimenting with rotating images. I made a rectangle rotate and a new rectangle would be drawn of the top and rotate, to create a pattern. At first the rectangle was filled in white with a black outline. I thought this was a bit boring so removed the fill and it created lots of lines, I thought this was a bit too busy so removed the outline and randomised the colours fill. Once i’d done this, I then looked at a way to make it interactive so I used mouseX, mouseY to get the spinning rectangle to follow the mouse (below) and I thought this was a good way to create some interesting imagery which I am going to mess around with over the weekend.

IMG_6142