admin管理员组文章数量:1302419
I am using pyvista
to produce a gif animation. My object is a square [0,10]×[0,10] located on the xy-plane (z-coordinate = 0).
I want to set the camera position to the center of the square which is (5,5,0) when viewed from above. I used the following code:
plotter.camera.position = [5.0, 5.0, 25]
plotter.camera.focal_point = [5.0, 5.0, 0]
plotter.camera.roll += 90
However, the square becomes completely invisible. No matter how I use the mouse to reorient in the preview environment, I can not find the object at all.
Then I just changed it a little bit by
plotter.camera.focal_point = [4.999, 5.0, 0]
Then it appears. It seems that as long as camera.position
and camera.focal_point
have equal x- and y-coordinates (z-coordinates don't matter), the object always becomes invisible.
But, I would like to know what is going on here and understand how pyvista.camera
works.
本文标签: pythonSet Pyvista Camera position object disappearStack Overflow
版权声明:本文标题:python - Set Pyvista Camera position object disappear - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741671520a2391631.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论