Hello! I need some help with this sketch. I’m trying to draw this shape filled with three different colors, in tree different vertex. I’m thinking I need to draw three ellipses of different colors, then they intersect with each other to create different shades/gradients between them. But ellipses need to have gradual transparency from center to the edges (100%-0%).
How can i do that? Or there are different method to achieve this result?
(Yes, I need to do a mask after that, but I don’t know how to do that with this shape with many vertices).
I’m so noob, sorry!
int[][] coordinate = {
{0, 150}, {100, 450}, {200, 500}, {150, 750}, {400, 850}, {500, 750}, {450, 450}, {500, 100}, {175, 0}
};
int dim;
int eldim = 790;
void setup() {
size(800, 475);
ellipseMode(CENTER);
}
void draw() {
background(#ffffff);
scale(0.5); //"MAP"
fill(#000000);
translate(50, 50);
noStroke();
beginShape();
for (int i = 0; i < coordinate.length; i++) {
vertex(coordinate[i][0], coordinate[i][1]);
}
endShape(CLOSE);
noFill(); //EllIPSES (x3)
strokeWeight(3);
stroke(#FF0000);
ellipse(0, 150, eldim, eldim);
noFill();
strokeWeight(3);
stroke(#FF0000);
ellipse(450, 450, eldim, eldim);
noFill();
strokeWeight(3);
stroke(#FF0000);
ellipse(150, 750, eldim, eldim);
}