/[escript]/trunk/pyvisi/py_src/examples/light.py
ViewVC logotype

Annotation of /trunk/pyvisi/py_src/examples/light.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1038 - (hide annotations)
Fri Mar 16 05:15:37 2007 UTC (13 years, 4 months ago) by jongui
File MIME type: text/x-python
File size: 879 byte(s)
Added more examples.
1 jongui 1038 from esys.pyvisi import Scene, DataCollector, Map, Light, GlobalPosition, Camera
2     from esys.pyvisi.constant import *
3    
4     s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1000,
5     y_size = 800)
6    
7     dc1 = DataCollector(source = Source.XML)
8     dc1.setFileName(file_name =
9     "/home/jongui/data/laurent/subduction/source/function.0271.vtk")
10    
11     m1 = Map(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
12    
13     c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
14     c1.isometricView()
15    
16     # Create one light instance.
17     lig = Light(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
18     lig.setColor(color = Color.WHITE)
19     lig.setIntensity(intensity = 1)
20     lig.setAngle(elevation = -15, azimuth = 0)
21    
22     # Alternative to using setAngle.
23     #lig.setPosition(GlobalPosition(0.1,0.1,0.1))
24     #lig.setFocalPoint(GlobalPosition(0,0,0))
25    
26     s.render()
27    
28    

  ViewVC Help
Powered by ViewVC 1.1.26