MIDTERM PROJECT UPDATE 2

AURA PART 2 UPDATE

If you can remember, I was basing my original concept on this painting that I made a couple of weeks ago.

Here is an update of how things are going.

PROGRESS:

So for this iteration of the project, I was mainly focusing on getting the user to be able to type in an initial of their name and the particles in the sketch to change colors accordingly via a CSV file I made connecting each letter of the alphabet to a different set of colors. FUN I know!

I was able to get this part of the project going and start mixing and matching the colors so that the user can actually see multiple colors being displayed in the sketch. 

COOL CODE:

 //TYPE IN INITIAL
  let sample = "A";
  
  // find the row index of the input sample initial and set that value to idx
  for (let i = 0; i < alphabet.length; i++) {
    if (alphabet[i] == sample) {
      idx = i; //4
    }
  } 
  // get corresponding colors 
  colors_for_sample = [color1[idx], color2[idx], color3[idx]];


  for (let i = 0; i < num; i++) {
    particles.push(createVector(random(width), random(height)));
  }
}

function draw() {
  background;
  for (let i = 0; i < num; i++) {
    let p = particles[i];
    square(p.x, p.y, 2);
    
    let color1 = color(colors_for_sample[0]);
    let color2 = color(colors_for_sample[1]); 
    
    fill(lerpColor(color1, color2, noise(p.x * noiseScale, p.y * noiseScale)));// lerpColor() function is used to interpolate two colors to find a third color between them.
    noStroke();

In the next step of my project I hope to add a background image behind my sketch, as well as some sound to make things a bit more interesting.

 

 

 

Leave a Reply