This week’s practice, I got inspiration from Sky’s last week using noise. I played around noise a little bit also.
https://editor.p5js.org/LunaChen/full/LrUC2dMd_
At first, I was struggle with where to start with, so I kind of waiting lots of time putting all kinds of cool stuff I think, just copy and paste in it.(I mean it was really messy……)
There are some examples from last week which I think also very cool, but I couldn’t manage them into order, so I finally only leave the noise part.
The noise parts contain two elements affected by noise, the first one is the line, starting from origin and random with noise to spread around.
And the second part is the small circle with random x,y and radius.
function Chaos(radius, num, trans, linePoint, wave) {
x = random(150, 600);
y = random(150, 600);
for (let i = 0; i < num; i++) {
let Noise = num * noise(frameCount / 1000 + i / 100, millis() / 1500);
//image(extraCanvas,0,0);
rotate(600 / num);
circle(x, y, radius);
line(linePoint, Noise, 0, Noise * wave);
stroke(Noise * wave/2, i * 0.7, Noise * wave*2, trans); //line color
strokeWeight(2.5);
}
}
First time trial, the number was either too large or not in align with the factors that I want them to change with.
Then I called the function in draw to make them loop, since using the function I created is not a loop. Again first time trial, the numbers are all really massy, and it took me so long to figuring out which one is the inner one, which one is the outer one.
function draw() {
background(0);
//Chaos(radius,num,trans,linePoint,wave)
//the inner most
Chaos(0.5, 250, 780, 50, 0.7);
Chaos(1, 350, 150, 70, 0.9);
Chaos(1.5, 300, 90, 200, 1.4);
Chaos(2, 550, 60, 100, 1.5);
Chaos(3, 400, 50, 250, 2);
//the outer most
Chaos(3.5, 600, 20, 350, 4);
Then I used mouse pressed statement here right after I called the “Chaos” function I made.
if (mouseIsPressed){
if(isPlaying){
soundFile.stop();
isPlaying=false;
}else{
soundFile.play();
isPlaying=true;
}
}
Sound file generated using [BeepBox](file:///C:/Users/17329/Downloads/beepbox_offline.html#9n31s0k0l00e03t2ma7g0fj07r1i0o432T1v1ub7f0q0x10p71d23A5F4B9Q0001Pffa7E4b862363379T1v1ue3f30rc2mc2i2q023d19AbF8B5Q024bPa872E26327aT7v1u71f50p61770q72d42g3q0F21a90k762d06HT-SRJJJJIAAAAAh0IaE1c11T2v1u15f10w4qw02d03w0E0b4h400000000h4g000000014h000000004h400000000p16000000), totally free with multiple instrument to play with, simple version to do some demo: