Closed Oguked closed 5 months ago
Hi @Oguked I would write it like this:
pip install -U vedo
then
from vedo import *
s1 = Sphere(pos=[100,0,0], r=10, res=8).wireframe().c('white')
s1.compute_normals(points=True, cells=False)
# Get the coordinates of the vertices of each sphere
start = s1.vertices
end = start + s1.vertex_normals * (5 + np.random.randn(len(start), 3))
t1 = 'Color arrows by size\nusing a color map'
a1 = Arrows(start, end, c="viridis", s=2, res=24).lighting("plastic")
a1.add_scalarbar(c='w')
show(s1, a1, t1, bg='bb', bg2='lb').close()
When the mesh is not in the origin, then the normal vectors are not perpendicular w.r.t. to the mesh surface.