Sunday, 29 April 2012
DSDN 142 - P2-My Noise images!
Here are some of my new noise images that I've been working on!! I have experimented with the sizes of my rectangles to see how small and big I could get them and when I made my pattern/rectangles really small it looked like noise or maybe even structured noise. Some of these images remind me of tiles but all mixed up. My goal for this was to created a pattern from my last code then make all the different rectangles on my pattern to appear all of the screen, multiple times. I was trying to achieve rectangular noise which I have achieved ! But you really cant see the rectangles because they are so small and it just looks like the t.v noise.
I really like what I have done and wants me to start experimenting with color and noise/structure!
-(codes at bottom)-
My original pattern .. Code :
int xRepeat = 150;
int yRepeat = 150;
int x = 20;
int y = 20;
int w1 =40;
int a = 10;
int b = 10;
int bw = b+w1+b;
void setup() {
size(500, 500);
smooth();
}
void draw() {
background(255);
for (int i = 0; i < width/xRepeat; i++) {
for (int j = 0; j < height/yRepeat; j++) {
pushMatrix();
translate(xRepeat*i, yRepeat*j);
myPattern();
popMatrix();
}
}
}
void myPattern() {
rect(x+a+w1, y+a+w1, bw, bw);
rect(x, y, a, a);
rect(x+a+w1+bw+w1, y, a, a);
rect(x, y+a+w1+bw+w1, a, a);
rect(x+a+w1+bw+w1, y+a+w1+bw+w1, a, a);
rect(x+a, y+a, w1, w1);
rect(x+a+w1+bw, y+a, w1, w1);
rect(x+a, y+a+w1+bw, w1, w1);
rect(x+a+w1+bw, y+a+w1+bw, w1, w1);
rect(x+a+w1+b, y+a, w1, w1);
rect(x+a, y+a+w1+b, w1, w1);
rect(x+a+w1+b, y+a+w1+bw, w1, w1);
rect(x+a+w1+bw, y+a+w1+b, w1, w1);
}
void mousePressed() {
save("image1.jpeg");
}
My Noise code: (needs changing)
int xRepeat = 150;
int yRepeat = 150;
int x = 20;
int y = 20;
int w1 = 40;
int a = 10;
int b = 10;
int bw = b+w1+b;
void setup() {
size(500, 500);
smooth();
background(255);
float i = (random(10));
while(i < 50){
rect(random(500),random(500),x,x);
rect(random(500),random(500),y,y);
rect(random(500),random(500),w1,w1);
rect(random(500),random(500),a,a);
rect(random(500),random(500),b,b);
rect(random(500),random(500),bw,bw);
i = i+0.1;
}
}
void draw(){
}
void mousePressed(){
save("image 127.jpeg");
}
Labels:
#DSDN 142
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment