File: shadow1.py

package info (click to toggle)
vedo 2025.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,404 kB
  • sloc: python: 64,792; javascript: 1,932; xml: 437; sh: 139; makefile: 6
file content (11 lines) | stat: -rw-r--r-- 353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
"""Cast a shadow of 2 meshes onto the wall"""
from vedo import dataurl, Mesh, Sphere, show

spider = Mesh(dataurl+"spider.ply")
# spider.rotate_z(-90).normalize()
spider.texture(dataurl+'textures/leather.jpg')
spider.add_shadow('x', -3)

sphere = Sphere(r=0.4).pos(0.5,0,1).add_shadow('x', -3)

show(spider, sphere, __doc__, axes=1, viewup="z").close()