Author: adamnagyblog

Final Magazine Cover

ca cover final.jpg

Advertisements

I tried many differnet ¬†backgrounds and patterns as well. Some of them worked some of them didn’t. The one on white background didn’t work because i had to mask out most of the design. I think the colourful one is too distracting so i think iwill go with the red or the green.

 

 

 

computer arts-01.jpg

100 Random Circles

100circles-01.jpg

int numCircles = 100; //number of circles

int circlesDrawn = 0; //circles have been drawn

void setup() {
 size(800, 800); 
 background(100); 
 
}

void draw() { //add 1 to the number of circles drawn
 
 if(circlesDrawn < numCircles) { //chose random position f
 
 ellipse(random(width), random(height),50,50);
 circlesDrawn = circlesDrawn + 1;
 }
}

Pattern

pattern-01.jpg




PImage img; 
void setup() {
 size(640, 360);
 
 img = loadImage("image.jpg"); // Load the image into the program
}

void draw() {
 
 int teller=0;
 
 for (int i = 0; i <10 ; i= i +1 )
 
 {
 
 for (int j = 0; j <10 ; j= j +1 )
 
 {

teller = teller +1;
 drawImage(i, j, 90*teller);//numbers: place x - place y - rotation in degrees
 
 
}
}
}

void drawImage(int xC, int yC, float myAngle) {
 pushMatrix();
 translate(img.width/2 + 80*xC, img.height/2 + 80*yC );
 rotate(PI/2 * myAngle/90);
 image(img, -img.width/2, -img.height/2 );
 popMatrix();
}

Squares

squares-01.jpg

int brickWidth = 40;
int brickHeight = 40;
int cols = 15;
int rows = 15;
int columnOffset = 60;
int rowOffset = 60;
float rotationIncrement = 0.15;

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

background(255);
 smooth();
 fill(1) ;
 stroke(0);
 noLoop();
}

void draw() {
 translate(30, 30);
 for (int i=0; i<cols; i++) {
 pushMatrix();
 translate(i * columnOffset, 0);
 float r = random(-QUARTER_PI, QUARTER_PI);
 int dir = 1;
 for (int j=0; j<rows; j++) {
 pushMatrix();
 translate(0, rowOffset * j);
 rotate(r);
 rect(-brickWidth/2, -brickHeight/2, brickWidth, brickHeight);
 popMatrix();
 r += dir * rotationIncrement;
 if (r > QUARTER_PI || r < -QUARTER_PI) dir *= -1;
 }
 popMatrix();
 }
}