Changes between Version 1 and Version 2 of Examples/ParaviewAnimating


Ignore:
Timestamp:
06/14/18 11:26:37 (6 years ago)
Author:
Herwig Zilken
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Examples/ParaviewAnimating

    v1 v2  
    1 = Animating Data with ParaView Python Scrtiing =
     1= Animating Data with ParaView Python Scripting =
    22Some information on how to write Python scripts to animate your data with ParaView can be found here: https://www.paraview.org/Wiki/ParaView/Python_Scripting
    33On this page, we would like to share our own experience with you.
    44
     5== ParaView Gui: Animation View ==
     6As usual, when you want to write a Python script for ParaView from scratch, and have no idea where to start, it make sense to open the ParaView GUI, start a Python trace, and prototype the desired setup in the GUI interactively. When you want to generate an animation, you have to deal with the Animation View, obviously.
     7[[Image(ParaView_AnimationView.jpg, align=left, margin=10)]]
     8
     9Unfortunately, ParaView is not willing to include all interactive settings in the trace. Some are just skipped, e.g. settings regarding the "TimeKeeper1 - Time" are NOT reflected in the trace. For this reason it makes sense to take a more closer look at the mechanisms and Python classes working behind the scene.
     10
     11== Basic Concept ==
     12The basic concept of how to animate "something", in this case the rendered ParaView scene, is quite easy to understand. The central key element of any animation is a timeline with a start and end time and, as we work with discrete timesteps, a number of frames.
     13Within the time interval defined in the timeline, properties of the scene can be changed.
     14In the ParaView GUI this concept is reflected by so called "tracks" (or "cues") in the Animation View. Each track defines the temporal change of one property of the scene.
     15
     16In ParaView-Python, different kinds (classes) of tracks/cues are available. On this page, we will try to explain four of them, which are implemented in the following Python classes:
     17* paraview.simple.KeyFrameAnimationCue: basic cue to animate general properties of objects (readers, sources, filters) in the render pipeline
     18* paraview.simple.CameraAnimationCue: cue to change camera parameters (position, focus point, up direction, view angle)
     19* paraview.simple.PythonAnimationCue: cue to execute a Python script at a certain point in time
     20* paraview.simple.TimeAnimationCue: cue to determine what data timesteps are loaded depending on the animation clock time
     21
     22The (change of the) values of the properties in the timeline are defined by one or more keyframes in each track. Every key elements :) of a keyframe are keytime and keyvalues. The value(s) of the referred property is set to the keyvalues at time keytime. Some types of keyframes also have the ability to interpolated to keyvalues from one keyframe to the next. Specifically these are