如何在指定区域中绘制表面的一部分?
我在3D中有一个参数表面。我想观察该表面的某些部分,特别是用 z&gt的部分; 0 和 x 2 + y 2 + z 2 2 < C 。
我尝试过的几种方法:
- 天真扔掉其余数据,例如设置
x [z< 0] = nan
等。由于这与我选择的参数不符,因此会创建衣衫式边缘。我可以选择某种“抗血液”插值选项?我将感谢指向Numpy或Plotly文档的指针。 - 试图设置颜色尺度的alpha。这种作品似乎引入了一些不正确的渲染。在下图中,深绿色的块应位于浅绿色磁盘的前面。我做错了吗?
另一方面,我无法在手册中找到设置“二维”颜色尺度的方式,因此我可以根据Z值同时设置不透明度,并根据其他一些兴趣数量。这可能吗?
有方便的方法可以实现我的目标吗?还是我可以改善上面的尝试?任何帮助都将受到赞赏!
I have a parametric surface in 3D. I would like to observe parts of this surface, specifically, the part with z > 0 and the part with x2 + y2 + z2 < c.
A few methods that I tried:
- Naïvely throwing away the rest of the data, for instance setting
X[Z<0] = nan
etc. Since this does not line up with the parametrization that I chose, it would create ragged edges. Is there some sort of "antialiasing" interpolation options that I can choose? I would be grateful for a pointer to the docs for numpy or plotly. - Trying to set the alpha of the color scale. This sort of works, it seems to introduce some incorrect rendering. In the picture below, the dark green lump should be at the front of the light green disk. Is there something that I did wrong?
On the other hand, I couldn't locate in the manual a way to set "two dimensional" color scales, so that I can simultaneously set the opacity according to the z value and the hue according to some other quantity of interest. Is this possible?
Is there a convenient method to achieve my goal? Or can I improve my attempts above? Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论