top of page
Search

Noise 2.0

The noise part seems to be the most important part of the whole semester. I wonder why is it that we had so little time, so much input and just one session to talk about this. The excercises are way more complex and there are lots of factors you can integrate to your coding. Since I seem to be able to do the excercises, I decided to continue.




I just played with the values a little bit to see how they affect the form when I changed them.


I tried then to add the corona:

Looks a little like a milky way. So I did a milky way:


So now, I decided to add the corona in a more organized way, using the drawVirus funtion, so that the elements of the corona are not that randomly places, but they work as one corona virus:


This took me a while to understand, you really need to play with the values, in order to get the result you want. Also, it did not work without the push matrix thing, which I thought was not that relevant for the result I wanted. Turns out it was :D.

Here is the code:

void setup() {

size(800, 800);

background(255, 240, 165);

int xMiddle=width/2; // start in the middle

int yMiddle=height/2;

int r=250;

for (float a=0; a<360; a=a+10) { // the distance between the coronas

float x=cos(radians(a))*r+xMiddle;

float y=sin(radians(a))*r+yMiddle;

float xOff=x/400.;

float yOff=y/300.;

float noiseFactor=noise(xOff, yOff)*2; // how much noise

drawVirus(x, y, noiseFactor, noiseFactor);

}

}


void drawVirus(float x, float y, float noiseFactor, float size) {

pushMatrix();

translate (x, y);

rotate(noiseFactor*radians(360));


// variables relating to virus

float body = 100;

float arms1 = 20;

float arms2 = 12;


scale(0.1);

//body of corona

noStroke();

fill(255, 115, 0);

ellipse(x, y, body, body);

//arms of corona

fill(255, 60, 0);

ellipse(x, y, arms1, arms1);

ellipse(x-25, y-15, arms2, arms2);

ellipse(x-35, y+27, arms1, arms1);

ellipse(x+30, y+15, arms2, arms2);

ellipse(x+35, y-35, arms1, arms1);

ellipse(x+45, y+45, arms2, arms2);

ellipse(x-65, y, arms1, arms1);

ellipse(x-35, y+55, arms2, arms2);

ellipse(x, y+65, arms1, arms1);

ellipse(x, y-65, arms2, arms2);

ellipse(x+65, y, arms1, arms1);

ellipse(x-45, y-45, arms2, arms2);


popMatrix();

}

So the last thing I wanted to try out is animated noise. I got the code from the script and started to change some values and elements. This happened:


I changed the line to an ellipse and this happened:

I find this very interesting, but without the code from the script I would have never done it. So, I think this is a little too much for me.

Nevertheless, I tried the last animated code form the script and changed the background to make it a little bit like a dark sky:


I also did not understand the code fully, since there was no explanation on the script.

 
 
 

Comments


© 2020 by Maria Guzman. Proudly created with Wix.com.

bottom of page