第一个圆的边界未显示在重叠的圆圈中

发布于 2025-01-21 10:19:14 字数 421 浏览 1 评论 0原文

我试图绘制两个相交的圆圈,如附件快照所示。

我的第一个圆的边界未显示,因为右上的第二个圆圈覆盖在上面。

有没有办法可以看到相交区域中两个圆的边界? https://i.sstatic.net/o0xsm.png“ alt =”在此处输入图像说明”>

我的代码:

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);
  
  
}

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?enter image description here

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);
  
  
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱要勇敢去追 2025-01-28 10:19:14

实际上,您正在绘制填充圆圈。使用 nofill(nofill()

void coolCircles()
{       
     noFill(); 
     stroke(150);
     ellipse(180, 250, x, x);      
     ellipse(360, 250, x, x); 
}

Actually you're drawing filled circles. Use noFill():

void coolCircles()
{       
     noFill(); 
     stroke(150);
     ellipse(180, 250, x, x);      
     ellipse(360, 250, x, x); 
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文