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()
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
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()
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')
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()
def test_ParametricRandomHills(): geom = pyvista.ParametricRandomHills() assert geom.n_points