コード例 #1
0
def load_random_hills():
    """Create random hills toy example.

    Uses the parametric random hill function to create hills oriented
    like topography and adds an elevation array.

    This example dataset was created with:

    .. code:: python

       >>> mesh = pyvista.ParametricRandomHills()
       >>> mesh = mesh.elevation()

    Returns
    -------
    pyvista.PolyData
        Random hills mesh.

    Examples
    --------
    >>> from pyvista import examples
    >>> mesh = examples.load_random_hills()
    >>> mesh.plot()

    """
    mesh = pyvista.ParametricRandomHills()
    return mesh.elevation()
コード例 #2
0
def hill(seed):
    mesh = pv.ParametricRandomHills(randomseed=seed,
                                    u_res=50,
                                    v_res=50,
                                    hillamplitude=0.5)
    mesh.rotate_y(-10)  # give the surfaces some tilt

    return mesh
コード例 #3
0
ファイル: examples.py プロジェクト: wsym812131/pyvista
def load_random_hills():
    """Create random hills toy example.

    Uses the parametric random hill function to create hills oriented
    like topography and adds an elevation array.
    """
    mesh = pyvista.ParametricRandomHills()
    return mesh.elevation()
コード例 #4
0
mobius = pv.ParametricMobius()
mobius.plot(color='tan')

###############################################################################
# Plucker Conoid
# ++++++++++++++

pluckerconoid = pv.ParametricPluckerConoid()
pluckerconoid.plot(color='tan')

###############################################################################
# Random Hills
# ++++++++++++

randomhills = pv.ParametricRandomHills()
randomhills.plot(color='tan')

###############################################################################
# Roman
# +++++

roman = pv.ParametricRoman()
roman.plot(color='tan')

###############################################################################
# Super Ellipsoid
# +++++++++++++++

superellipsoid = pv.ParametricSuperEllipsoid(n1=0.1, n2=2)
superellipsoid.plot(color='tan')
コード例 #5
0
ファイル: examples.py プロジェクト: snowfox1939/pyvista
def load_random_hills():
    """Uses the parametric random hill function to create hills oriented like
    topography and add's an elevation array"""
    mesh = pyvista.ParametricRandomHills()
    mesh.rotate_y(90)
    return mesh.elevation()
コード例 #6
0
def test_ParametricRandomHills():
    geom = pyvista.ParametricRandomHills()
    assert geom.n_points