I am using OVITO through python to visualize a series of data generated by LAMMPS. The problem I have encountered is I cannot find a way to zoom image using OVITO python module. The zoom_all() function can adjust the viewport camera such that all objects in the scene become completely visible but how to zoom in to show only a desired part of image?
Dear fff,
You can conrol the zooming section of your data in ovito using following functions.
vp = Viewport()
vp.type = Viewport.Type.Ortho
vp.camera_pos = (29.1721, 29.7081, 45)
vp.camera_dir = (0.000, 0.000, -1.0)
vp.fov = 33
vp.camera_up = (0.000, 1.000, 0.000)
The values in the code only for example, you can collect this values from Ovito (GUI) for zoom section, then use that value in Ovito (python).
It works. Thank you!