闪亮Python三维曲面图的Phong着色

2024-04-27 17:33:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试用Python创建具有镜面阴影的美观的3D绘图,到目前为止,我已经尝试使用Matplotlib和Mayavi的3D轴和surface绘图,例如Mayavi surf examples网页:

enter image description here

结果看起来不错,在马亚维似乎有合理的灯光控制,虽然我似乎无法实现一个“闪亮”的外观。

在Matlab中,这可以通过使用“Phong”照明来实现:

enter image description here

http://www.mathworks.com/matlabcentral/fileexchange/35240-matlab-plot-gallery-change-lighting-to-phong/content/html/Lighting_Phong.html

因此,我的问题是:如何在基于Python的3D打印中实现这种Phong样式的明暗处理?


Tags: http网页绘图matplotlibhtmlsurfaceexamplessurf