[Paraview] zooming in when using perspective projection via vtkCamera.Zoom
Milos Ilak
ilak at mech.kth.se
Fri Sep 24 05:51:27 EDT 2010
I just saw what I wrote...in second and fourth paragraph, I mean
*perspective*, not parallel projection...
Milos
On Fri, Sep 24, 2010 at 11:47 AM, Milos Ilak <ilak at mech.kth.se> wrote:
> Hi,
>
> I would like to be able to zoom during an animation using perspective
> projection. I am doing everything via a Python script. For parallel
> projection, the transformation is simple and one zooms just by changing a
> constant factor, i.e., setting the CameraParallelScale variable, and the
> camera doesn't 'move'.
>
> In parallel projection, however, one needs to change the actual camera
> position and the transformation is not that simple. Looking at the Python
> trace after zooming with the middle button, ParaView just reports the new
> camera position, but not how it was calculated.
>
> Looking at vtk documentation, there is a class called vtkCamera, which can
> be zoomed simply, just using vtkCamera.Zoom(float), which supposedly zooms
> properly both in parallel and perspective projections, at least according to
> the documentation. What I can't figure out is how to call a renderer using
> the vtk module and create the vtkCamera for that renderer, i.e., there would
> be a RenderView object V of some sort, and we would just set
>
> V.vtkCamera.Zoom(float)
>
> However, there is no vtkRenderView or vtkView within the vtk Python classes
> provided by the module that comes with ParaView. Would someone be able to
> tell me what GetRenderView() in paraview acually calls? Or if I am headed in
> the wrong direction, how should this be done properly? I hope I don't have
> to code up all the transformations by hand to obtain the new camera position
> for parallel projection...Thanks,
>
> Milos
>
>
> --
> Miloš Ilak
> Linné Flow Centre
> KTH Mechanics, Stockholm
> +46(0) 8 790-7152
> www2.mech.kth.se/~ilak <http://www2.mech.kth.se/%7Eilak/>
>
>
>
--
Miloš Ilak
Linné Flow Centre
KTH Mechanics, Stockholm
+46(0) 8 790-7152
www2.mech.kth.se/~ilak <http://www2.mech.kth.se/%7Eilak/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100924/0afd2c6a/attachment.htm>
More information about the ParaView
mailing list