fabianmoronzirfas
11/16/2016 - 7:05 AM

design_a_word_01.pde


color c1 = color(#282D38); // dark
color c2 =  color(#FFBA52); // yellow
color c3 = color(#34415E); // blue
// this is a linear gradient
// but using lines would be cheating
//for (int i = 0; i < height; i++) {
//  float inter = map(i, 0, height*2, 0, 1);
//  stroke(lerpColor(c1, c2, inter));
//  line(0, i, width, i);
//}
size(200, 200); // set the size of the canvas

int diam = width/2; // the diameter of the circle
int percent = 7; // ecentae for in out set smooth glow
int inoutset = ((diam/100) * percent); // calc it
background(c3);
noStroke();
// create the glow with a loop
for (int j = diam - inoutset; j < diam + inoutset; j++ ) {
  fill(c2, 80); // make it with a lot of alpha
  ellipse(width/3, height/2, j, j); // draw it
}
fill(c2); 
ellipse(width/3, height/2, diam, diam); // one circle

// and the cutting one
ellipseMode(CORNER);
fill(c1);
ellipse(-width, height/2, width * 5, width);
saveFrame("out.png");