注釈
Go to the end をクリックすると完全なサンプルコードをダウンロードできます.
メッシュを反射#
この例では,メッシュを平面に反射します.
from __future__ import annotations
import pyvista
from pyvista import examples
この例では,メッシュをプレーンに反射させる方法を示します.
サンプルメッシュをロードする:
airplane = examples.load_airplane()
Z平面に平行で (0, 0, -100) に一致する平面でメッシュを反射します.
airplane_reflected = airplane.reflect((0, 0, 1), point=(0, 0, -100))
反射メッシュをプロットします:
p = pyvista.Plotter()
p.add_mesh(airplane, show_edges=True)
p.add_mesh(airplane_reflected, show_edges=True)
p.show()

Total running time of the script: (0 minutes 0.250 seconds)