注釈
Go to the end をクリックすると完全なサンプルコードをダウンロードできます.
パラメトリックジオメトリオブジェクト#
パラメトリックオブジェクトを作成する
from math import pi
import pyvista as pv
この例では,pyvistaを使用してパラメトリックオブジェクトをプロットする方法を示します.
スーパートロイド#
supertoroid = pv.ParametricSuperToroid(n1=0.5)
supertoroid.plot(color='lightblue', smooth_shading=True)
パラメトリック楕円体#
# Ellipsoid with a long x axis
ellipsoid = pv.ParametricEllipsoid(10, 5, 5)
ellipsoid.plot(color='lightblue')
部分パラメトリック楕円体#
Pseudosphere#
pseudosphere = pv.ParametricPseudosphere()
pseudosphere.plot(color='lightblue', smooth_shading=True)
Bohemianドーム#
bohemiandome = pv.ParametricBohemianDome()
bohemiandome.plot(color='lightblue')
Bour#
bour = pv.ParametricBour()
bour.plot(color='lightblue')
Boyの表面#
boy = pv.ParametricBoy()
boy.plot(color='lightblue')
Catalan最小#
catalanminimal = pv.ParametricCatalanMinimal()
catalanminimal.plot(color='lightblue')
円錐スパイラル#
conicspiral = pv.ParametricConicSpiral()
conicspiral.plot(color='lightblue')
クロスキャップ#
crosscap = pv.ParametricCrossCap()
crosscap.plot(color='lightblue')
ディーニ#
dini = pv.ParametricDini()
dini.plot(color='lightblue')
Enneper#
enneper = pv.ParametricEnneper()
enneper.plot(cpos="yz")
字形-8 Klein#
figure8klein = pv.ParametricFigure8Klein()
figure8klein.plot()
Henneberg#
henneberg = pv.ParametricHenneberg()
henneberg.plot(color='lightblue')
Klein#
klein = pv.ParametricKlein()
klein.plot(color='lightblue')
Kuen#
kuen = pv.ParametricKuen()
kuen.plot(color='lightblue')
Mobius#
mobius = pv.ParametricMobius()
mobius.plot(color='lightblue')
Plucker Conoid#
pluckerconoid = pv.ParametricPluckerConoid()
pluckerconoid.plot(color='lightblue')
ランダムな丘#
randomhills = pv.ParametricRandomHills()
randomhills.plot(color='lightblue')
ローマン#
roman = pv.ParametricRoman()
roman.plot(color='lightblue')
スーパー楕円体#
superellipsoid = pv.ParametricSuperEllipsoid(n1=0.1, n2=2)
superellipsoid.plot(color='lightblue')
トーラス#
torus = pv.ParametricTorus()
torus.plot(color='lightblue')
円弧#
pointa = [-1, 0, 0]
pointb = [0, 1, 0]
center = [0, 0, 0]
resolution = 100
arc = pv.CircularArc(pointa, pointb, center, resolution)
pl = pv.Plotter()
pl.add_mesh(arc, color='k', line_width=4)
pl.show_bounds()
pl.view_xy()
pl.show()
押し出し半円弧#
pointa = [-1, 0, 0]
pointb = [1, 0, 0]
center = [0, 0, 0]
resolution = 100
arc = pv.CircularArc(pointa, pointb, center, resolution)
poly = arc.extrude([0, 0, 1])
poly.plot(color='lightblue', cpos='iso', show_edges=True)
/home/runner/work/pyvista-docs-dev-ja/pyvista-docs-dev-ja/pyvista-doc-translations/pyvista/pyvista/core/filters/poly_data.py:2932: PyVistaFutureWarning: The default value of the ``capping`` keyword argument will change in a future version to ``True`` to match the behavior of VTK. We recommend passing the keyword explicitly to prevent future surprises.
warnings.warn(
Total running time of the script: (0 minutes 9.246 seconds)