Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

I think render_points_as_spheres and points_gaussian both use rendering tricks under the hood to make the points look like spheres without actually being spheres. Using actual geometric spheres is helpful because the point normals are computed and used for shading, and will zoom in and out as desired.

You can create many spheres using glyph:

import pyvista as pv
import numpy as np

point_cloud = pv.PolyData(np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [2.0, 0.0, 0.0]]))
point_cloud.glyph(geom=pv.Sphere()).plot()

EDIT: Here's a more complete example with smooth_shading enabled.

import pyvista as pv
import numpy as np

point_cloud = pv.PolyData(np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [2.0…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@contagon
Comment options

Answer selected by contagon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants