discussion_784.py 299 B

1234567891011121314
  1. from vedo import *
  2. s = Sphere(quads=True, res=10) # some test points in space
  3. pts = s.vertices
  4. vpts = Points(pts)
  5. vpts.compute_normals_with_pca(invert=True)
  6. vpts.print()
  7. normals = vpts.pointdata["Normals"]
  8. arrows = Arrows(pts, pts + normals/10).c('red5')
  9. show(vpts, arrows, axes=True).close()