TVTK库
以CubeSource对象举例
创建一个基本对象
from tvtk.api import tvtk s = tvtk.ConeSource(height=3.0, radius=1.0, resolution=36) print(s)
显示
扫描二维码关注公众号,回复: 9909077 查看本文章from tvtk.api import tvtk s=tvtk.CubeSource(x_length=1.0, y_length=2.0, z_length=3.0) m=tvtk.PolyDataMapper(input_connection =s.output_port) a=tvtk.Actor(mapper=m) r=tvtk.Renderer(background =(0,0,0)) r.add_actor(a) w=tvtk.RenderWindow(size=(300,300)) w.add_renderer(r) i=tvtk.RenderWindowInteractor(render_window=w) i.initialize() i.start()
Python科学计算三维可视化
猜你喜欢
转载自blog.csdn.net/hxxjxw/article/details/104229183
今日推荐
周排行