Instersection between lines and circle
in
Programming Questions
•
6 months ago
Hey Everyone
I'm all noob to this whole processing thing so i'm sorry if this is question is a little ridiculous question but i could really use a little help. So thank you very much in advance.
I got all theese vertex lines rotating around but i only want to see the part that is within the static ellipse area. I realise that i could do this by making a white rectangle with a hole in it, as a mask, but then i get a white area in my output pdf. So i think i need somekind of cutting where the vertex intersects with the ellipse or?
I hope this gives a description of what i'm looking for:
My code is this:
I'm all noob to this whole processing thing so i'm sorry if this is question is a little ridiculous question but i could really use a little help. So thank you very much in advance.
I got all theese vertex lines rotating around but i only want to see the part that is within the static ellipse area. I realise that i could do this by making a white rectangle with a hole in it, as a mask, but then i get a white area in my output pdf. So i think i need somekind of cutting where the vertex intersects with the ellipse or?
I hope this gives a description of what i'm looking for:
My code is this:
- void setup() {
size(1000, 1000);
}
void draw() {
noFill();
background(255);
ellipse(500,500,900,900);
translate(500, 335);
strokeWeight(3);
strokeJoin(ROUND);
rotate(radians(frameCount));
beginShape();
vertex(523,203);
vertex(457,396);
vertex(393,348);
vertex(320,358);
vertex(448,266);
vertex(456,206);
endShape();
beginShape();
vertex(316,211);
vertex(360,225);
endShape();
beginShape();
vertex(372,158);
vertex(294,158);
vertex(276,224);
endShape();
beginShape();
vertex(187,245);
vertex(276,224);
vertex(305,222);
vertex(282,241);
vertex(196,287);
endShape();
beginShape();
vertex(284,274);
vertex(300,286);
vertex(306,296);
vertex(311,313);
vertex(310,329);
endShape();
beginShape();
vertex(306,296);
vertex(256,336);
endShape();
beginShape();
vertex(260,430);
vertex(255,389);
vertex(208,363);
vertex(229,331);
vertex(256,336);
vertex(265,371);
vertex(302,377);
endShape();
beginShape();
vertex(27,429);
vertex(49,411);
endShape();
beginShape();
vertex(11,309);
vertex(31,344);
vertex(120,355);
endShape();
beginShape();
vertex(26,289);
vertex(41,313);
vertex(129,326);
endShape();
beginShape();
vertex(-94,258);
vertex(-27,235);
vertex(25,206);
vertex(61,143);
endShape();
}
1