def test_interpolate(): surface = examples.download_saddle_surface() points = examples.download_sparse_points() # Run the interpolation interpolated = surface.interpolate(points, radius=12.0) assert interpolated.n_points assert interpolated.n_arrays
def test_download_saddle_surface(): data = examples.download_saddle_surface() assert data.n_cells
############################################################################### # Run the algorithm and plot the result result = mesh.sample(data_to_probe) # Plot result name = "Spatial Point Data" result.plot(scalars=name, clim=data_to_probe.get_data_range(name)) ############################################################################### # Interpolate # +++++++++++ # # Resample the points' arrays onto a surface using an interpolation from a Gaussian Kernel # Download sample data surface = examples.download_saddle_surface() points = examples.download_sparse_points() p = pv.Plotter() p.add_mesh(points, point_size=30.0, render_points_as_spheres=True) p.add_mesh(surface) p.show() ############################################################################### # Run the interpolation interpolated = surface.interpolate(points, radius=12.0) p = pv.Plotter() p.add_mesh(points, point_size=30.0, render_points_as_spheres=True) p.add_mesh(interpolated, scalars="val")
def make_example_data(): surface = examples.download_saddle_surface() points = examples.download_sparse_points() poly = surface.interpolate(points, radius=12.0) return poly