Parametric Geometric Objects

Creating parametric objects

# sphinx_gallery_thumbnail_number = 12
import pyvista as pv
from math import pi

This example demonstrates how to plot parametric objects using pyvista

Supertoroid

supertoroid = pv.ParametricSuperToroid(n1=0.5)
supertoroid.plot(color="tan", smooth_shading=True)
../../_images/sphx_glr_create-parametric-geometric-objects_001.png

Parametric Ellipsoid

# Ellipsoid with a long x axis
ellipsoid = pv.ParametricEllipsoid(10, 5, 5)
ellipsoid.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_002.png

Partial Parametric Ellipsoid

# cool plotting direction
cpos = [
    (21.9930, 21.1810, -30.3780),
    (-1.1640, -1.3098, -0.1061),
    (0.8498, -0.2515, 0.4631),
]


# half ellipsoid
part_ellipsoid = pv.ParametricEllipsoid(10, 5, 5, max_v=pi / 2)
part_ellipsoid.plot(color="tan", smooth_shading=True, cpos=cpos)
../../_images/sphx_glr_create-parametric-geometric-objects_003.png

Pseudosphere

pseudosphere = pv.ParametricPseudosphere()
pseudosphere.plot(color="tan", smooth_shading=True)
../../_images/sphx_glr_create-parametric-geometric-objects_004.png

Bohemian Dome

bohemiandome = pv.ParametricBohemianDome()
bohemiandome.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_005.png

Bour

bour = pv.ParametricBour()
bour.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_006.png

Boy’s Surface

boy = pv.ParametricBoy()
boy.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_007.png

Catalan Minimal

catalanminimal = pv.ParametricCatalanMinimal()
catalanminimal.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_008.png

Conic Spiral

conicspiral = pv.ParametricConicSpiral()
conicspiral.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_009.png

Cross Cap

crosscap = pv.ParametricCrossCap()
crosscap.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_010.png

Dini

dini = pv.ParametricDini()
dini.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_011.png

Enneper

enneper = pv.ParametricEnneper()
enneper.plot(cpos="yz")
../../_images/sphx_glr_create-parametric-geometric-objects_012.png

Figure-8 Klein

figure8klein = pv.ParametricFigure8Klein()
figure8klein.plot()
../../_images/sphx_glr_create-parametric-geometric-objects_013.png

Henneberg

henneberg = pv.ParametricHenneberg()
henneberg.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_014.png

Klein

klein = pv.ParametricKlein()
klein.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_015.png

Kuen

kuen = pv.ParametricKuen()
kuen.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_016.png

Mobius

mobius = pv.ParametricMobius()
mobius.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_017.png

Plucker Conoid

pluckerconoid = pv.ParametricPluckerConoid()
pluckerconoid.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_018.png

Random Hills

randomhills = pv.ParametricRandomHills()
randomhills.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_019.png

Roman

roman = pv.ParametricRoman()
roman.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_020.png

Super Ellipsoid

superellipsoid = pv.ParametricSuperEllipsoid(n1=0.1, n2=2)
superellipsoid.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_021.png

Torus

torus = pv.ParametricTorus()
torus.plot(color="tan")
../../_images/sphx_glr_create-parametric-geometric-objects_022.png

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

Gallery generated by Sphinx-Gallery