Eye Sore

 


            This exercise was sort of a review for me. The gradient colours of the rectangles are something I just learned in class but when I read the Processing site, there is a different way to do gradients but it looked complicated. I could've copy pasted some codes but I want to understand how it works. I'll probably use this code again but add motions to it to make it more of an eye sore. 


Here's the code I used:



size(1000,1000);                                       //size of window
background(0);                                         //BGcolor

// GRADIENT RECTANGLES ORANGE TO PINK

for(int x = 0; x < 1000; x += 10){

fill(252,130,x/4,50);

rect(0,x,x,x);                                           //the gradients work here for some reason
}
//BIG SKY BLUE CIRCLE. TRYING TO MAKE A GRADIENT OUT OF THIS

int x = 162;                                            //using a variable to see if stroke colour is working
strokeWeight(3);
stroke(133,188,x/4);
for(int d = 25; d <= width/2; d+= 25){
fill(130,252,d/3,50);
//ellipse(0,d,d,d);                                 //if I use this one, the gradient works
ellipse(width/2,height/2,d,d);             //width/2 and height/2 so circle is at the center of window

}

//OVERLAPPING PURPLE SPHERES

for(int b = 0; b < 1000; b += 10){     //if I remember it right, b/4 makes the gradient?
fill(168,130,b/4, 50);                        //fill(R,G,B,opacity/transparency)
strokeWeight(2);                              //how thicc the strokes are
stroke(130,192, b/4, 60);                 //trying to make gradient strokes. idk if it worked?
}

//I FORGOT WHAT THIS ONE IS BUT WHEN I RUN IT BY ITSELF, IT LOOKS LIKE SCALES
//WITHOUT THIS CODE, THE OVERLAPPING SPHERES WILL DISAPPEAR


int a = 150;                                     //size of spheres
int spacing = 75;                            //the space between the overlapping spheres
for(int i = 0; i < width; i += spacing){ //did this to fill the window space
for(int j = 0; j < height; j += spacing){
ellipse(i,j,a,a);
}
}

//TEXT APOLOGY
String c = "I am sorry for hurting your eyes"; 
                           //used string instead of text because I think it would be cleaner
fill(0);                //I can do gradients probably but that would defeat the purpose of the apology
textSize(30);     //big enough to read!
text(c, 270,height/2); //c is variable for the string. 280 is where in the xAxis
                                  //i should start my string then height/2 is location for yAxis


saveFrame("loopEllipse.png");

Comments

Popular posts from this blog

Final Thoughts

Learning UNITY (Kinetic Sequence): Two Friends Helping out Romeo

What is happening