'Border of first circle is not displayed in overlapping circles
I am trying to draw two intersecting circles, as shown in the attached snapshot.
The border of my first circle on left is not displayed since the second circle on right is overlayed on it.
Is there a way that I can see the border of both the circles in the intersecting region?
My code:
int x = 250;
void setup()
{
size(500,500);
background(255);
}
void draw()
{
coolCircles();
}
void coolCircles()
{
stroke(150);
ellipse(180, 250, x, x);
ellipse(360, 250, x, x);
}
Solution 1:[1]
Actually you're drawing filled circles. Use noFill():
void coolCircles()
{
noFill();
stroke(150);
ellipse(180, 250, x, x);
ellipse(360, 250, x, x);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
