[Paraview] Is the VIEW-UP vector updated automatically?

Kazuyoshi Furutaka furutaka.kazuyoshi at jaea.go.jp
Mon Oct 6 21:29:16 EDT 2014


Dear Utkarsh,

Thanks for the great hint!
By forcing the update of view-up using cam.OrthogonalizeViewUp()
on initialization as well as on changing azimuthal angle etc.,
I can successfully change azimuth angle instead of rolling.

Thanks again.
Kazuyoshi

From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
Subject: Re: [Paraview] Is the VIEW-UP vector updated automatically?
Date: Mon, 6 Oct 2014 20:49:35 -0400

> The meaning of azimuth, elevation etc. is indeed same with VTK and
> ParaVIew. ParaView uses the same code for Camera as in VTK, so there's
> no different there. Here's some explanation on the inner workings of
> the camera:
> 
> + The camera->ViewUp is used by vtkCamera as a "hint" for the up
> direction. Thus, it is need not always be orthogonal to the view
> direction (defined by camera position and camera focal point). Unless
> the ViewUp is parallel to the view -direction, the vtkCamera will
> automatically compute the true "viewup" internally using
> vtkCamera::ViewUp as a hint.
> + You can use cam.OrthogonalizeViewUp() to force the vtkCamera to
> update the VIewUp based on the internally used ViewUp.
> 
> e.g.
> 
>>>> cam = GetActiveCamera()
>>>> cam.SetPosition(0, 3, 3)
>>>> Render()
>>>> cam.GetViewUp()
> (0.0, 1.0, 0.0)
>>>> cam.OrthogonalizeViewUp()
>>>> cam.GetViewUp()
> (0.0, 0.7071067811865476, -0.7071067811865476)
> 
> I am not sure I observe the same problem as you mention with Azimuth/Roll.
> 
> Utkarsh
> 
> On Mon, Oct 6, 2014 at 8:25 PM, Kazuyoshi Furutaka
> <furutaka.kazuyoshi at jaea.go.jp> wrote:
>> Could someone tell me whether the meanings of the azimuth and
>> the elevation in ParaView the same as those in VTK (or "The
>> Visualization Toolkit" book, 4th ed.) or not?
>>
>> In the book it reads:
>> "Changing the \textit{azimuth} of a camera rotates its position
>> around its view up vector, centered at the focal point.  Think
>> of this as moving the cmaera to the left or right while always
>> keeping the distance to the focal point constant.  Changing a
>> camera's \textit{elevation} rotates its position around the cross
>> product of its direction of projection and view up centered at the
>> focal point.  This corresponds to moving the camera up and down.
>> To \textit{roll} the camera, we rotate the view up vector about
>> the view plane normal.  Roll is sometimes called twist."
>>
>> I sometimes observe that (in the Multi Slice view,) Azimuth()
>> "rolls" instead of moving the camera left/right.
>>
>> That's why I want to understand the geometry of view-up, direction
>> of projection, and so on...
>>
>> Kazuyoshi
>>
>>
>> From: Kazuyoshi Furutaka <furutaka.kazuyoshi at jaea.go.jp>
>> Subject: Re: [Paraview] Is the VIEW-UP vector updated automatically?
>> Date: Tue, 07 Oct 2014 08:57:30 +0900 (JST)
>>
>>> I just want to write a Python macro to change/rotate the camera
>>> position using Azimuth() and Elevation().
>>>
>>> In addition to the following:
>>>
>>>> I'm observing a curious behavior of paraview.simple.Azimuth();
>>>> camera is NOT moving left/right.
>>>
>>> I sometimes get the following message
>>>
>>>  Warning: In /home/furutaka/work/ParaView/ParaView.git/VTK/Rendering/Core/vtkRenderer.cxx, line 1030
>>> vtkOpenGLRenderer (0xa702510): Resetting view-up since view plane normal is parallel
>>>
>>> and am wondering how can the view-up be parallel to the view-plane
>>> normal...
>>>
>>> My understanding is that the view-up is (always) perpendicular to
>>> the direction of projection (pointing upward of the computer display)
>>> and therefore parallel to the view-plane, so the view-up should always
>>> be normal to view-plane normal.
>>> Isn't the view-plane normal parallel to the direction of projection?
>>> Isn't the view-plane parallel to the front/back clipping planes?
>> --
>> Kazuyoshi Furutaka
>> furutaka _dot_ kazuyoshi _at_ jaea _dot_ go _dot_ jp
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview


More information about the ParaView mailing list