CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Determine Viewing Angle from a specific View Direction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2017, 11:13
Default Determine Viewing Angle from a specific View Direction
  #1
New Member
 
Anonymous
Join Date: Jun 2017
Posts: 1
Rep Power: 0
Artikodin is on a distinguished road
Hello ladies and gentlemen,

I am using Paraview to determine some preset viewing angles that I will use in a personal simulation code to rotate my geometry and to create 3D projection of this geometry (outputting 2D image).

So, from the view direction -Z, I can use the camera control to rotate the object and have my viewing angles. Problem are that these actions are cumulative and so not user friendly.

What I want is to be able do display or calculate these angles as I rotate manually the object with the mouse.

A little bit like you can do on Matlab with scatter3 but with one more angle (the roll). I think it's also necessary to say that the angles I have with matlab are not really what I want but it is just plus or minus pi/2 so not a big deal... but there is still an angle missing and I don't have all the features that ParaView has.

Moreover, I have started to write a Python Script to calculate the angles but it is a nightmare as it doesn't work for all angles and for all situations (camera in a plan).

To summarize my question, can we display the viewing angle or calculate them while we are rotating the geometry with the mouse ?

Thank you in advance.

Artikodin - Yes, I am a Pokemon.


PS : I am not a native english speaker... :P
Artikodin is offline   Reply With Quote

Old   June 27, 2017, 06:05
Default
  #2
Member
 
Swempa's Avatar
 
Join Date: Apr 2015
Posts: 37
Rep Power: 11
Swempa is on a distinguished road
Quote:
Originally Posted by Artikodin View Post
Hello ladies and gentlemen,

I am using Paraview to determine some preset viewing angles that I will use in a personal simulation code to rotate my geometry and to create 3D projection of this geometry (outputting 2D image).

So, from the view direction -Z, I can use the camera control to rotate the object and have my viewing angles. Problem are that these actions are cumulative and so not user friendly.

What I want is to be able do display or calculate these angles as I rotate manually the object with the mouse.

A little bit like you can do on Matlab with scatter3 but with one more angle (the roll). I think it's also necessary to say that the angles I have with matlab are not really what I want but it is just plus or minus pi/2 so not a big deal... but there is still an angle missing and I don't have all the features that ParaView has.

Moreover, I have started to write a Python Script to calculate the angles but it is a nightmare as it doesn't work for all angles and for all situations (camera in a plan).

To summarize my question, can we display the viewing angle or calculate them while we are rotating the geometry with the mouse ?

Thank you in advance.

Artikodin - Yes, I am a Pokemon.


PS : I am not a native english speaker... :P

Hi Artikodin,

Maybe i understood you question wrong, but i think you want to compute the incremental/delta of the viewing angle. There is probably several ways to do this, but to get the current viewing angle or camera movement i would simply compute it with the knowledge of the focal point and the camera position.

Either you can use the camera control which show the active camera position, but i think it would be more convenient to just trace the movement (Tools -> Start Trace). Good to know is that you need to hide the object of interest before tracing, and unhide it after you started the trace.

When you stop tracing you will get information about "current camera placement" for the active render view. This includes all the necessary info with the CameraPosition, CameraFocalPoint and CameraViewUp, which you can use to compute the movement with the delta angle between two positions.

If you are using a python script to make the postpro you can simply just copy these lines into the script to replicate the views.

Hope this can help your project, good luck.
Cheers
Swempa is offline   Reply With Quote

Reply

Tags
angle, camera, display, paraview, viewing


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
Constant velocity of the material Sas CFX 15 July 13, 2010 09:56
Variable in specific direction camilo_costa CFX 2 August 17, 2009 08:51
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 13:02


All times are GMT -4. The time now is 04:51.