Hi all,

I am looking for the good piece of code for a script in order to
visualize my scene along the Y axis (either +Y or -Y), but with the x
axis horizontal, and the z axis vertical.
The two "Y" buttons on the scene toolbar always put the x vertical and
the z horizontal.

I tried using the script recorder and changing the numerical values of
the viewing parameters, but I don't get nice, clean, horizontal and
vertical axes. And when I do an animation of my scenes, the axes move
slightly (~1 pixel), giving an unpleasant result (this does not happen
when using the "Y" buttons). here is the piece of code I am using with a
not so good result:

------------------------------------------
s = mayavi.engine.current_scene
s.scene.camera.position = [0, -28, 2.5]
s.scene.camera.focal_point = [0, 0, 2.5]
s.scene.camera.view_angle = 15.0
s.scene.camera.view_up = [0, 0, 1]
s.scene.camera.clipping_range = [20, 40]
s.scene.camera.compute_view_plane_normal()
s.scene.parallel_projection = True 
s.scene.camera.zoom(1.5)
------------------------------------------

Any help will be welcome!

thanks,
   giovanni


-- 
Giovanni Ghigliotti, PhD
Postdoctoral Fellow
University of British Columbia
Department of Chemical and Biological Engineering
2360 East Mall
Vancouver, BC V6T 1Z3
Canada

gghiglio...@chbe.ubc.ca
+1 604.827.5685




------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to