简体   繁体   English

NetLogo 3D:透明补丁

[英]NetLogo 3D: Transparent Patches

I am trying to use NetLogo 3D, but when I click "setup", I can't see the turtles through the 3D patches. 我正在尝试使用NetLogo 3D,但是当我单击“设置”时,无法通过3D补丁看到海龟。 If I go to settings and make the zcor 0, I can see my turtles. 如果我进行设置并将zcor设置为0,则可以看到我的乌龟。 So, I know that my code works. 因此,我知道我的代码有效。 Is there any way that I can make the patches transparent so that I can see through them. 有什么方法可以使补丁透明,以便可以看穿它们。 I've done some searching, and it looks like there is no way to do it. 我已经做了一些搜索,看起来好像没有办法。 But, I wanted to see if any of you knew any different. 但是,我想看看你们中是否有人知道任何不同。

Check out the NetLogo programming guide on colors , specifically the section on RGB and RGBA Colors. 查看有关颜色NetLogo编程指南 ,特别是有关RGB和RGBA颜色的部分。 In short, you can specify colors using a list of 3 or 4 numbers (all from 0 to 255). 简而言之,您可以使用3或4个数字(从0到255)的列表来指定颜色。 The first is the amount of red, the second the amount of green, the third the amount of blue, and the fourth (if present) is how opaque the color should be. 第一个是红色的量,第二个是绿色的量,第三个是蓝色的量,第四个(如果存在)是颜色的不透明度。 The lower this last number is, the more transparent the color will be. 最后一个数字越小,颜色将越透明。 So set pcolor [255 0 0 192] will make a patch red and mostly opaque, whereas set pcolor [255 0 0 64] will make the patch quite see-through. 因此, set pcolor [255 0 0 192]将使补丁变成红色,并且大多数情况下是不透明的,而set pcolor [255 0 0 64]将使补丁变得非常透明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM