Animating isosurface

Revision as of 18:49, 9 November 2012 by Cyrus (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This script animates an isosurface.

  • You will need to replace the variable "noise_file" with something relevant to your filesystem
  • You can run this by:
    1. Saving the script below to "script.py"
    2. Running "visit -cli -s script.py"

The script

noise_file = "example.silo"
# For you:
# noise_file = "/path/to/data/example.silo"
 
OpenDatabase(noise_file)
AddPlot("Pseudocolor", "temp")
iso_atts = IsosurfaceAttributes()
iso_atts.contourMethod = iso_atts.Value
AddOperator("Isosurface")
DrawPlots()
 
for i in range(30):
   iso_atts.contourValue = (2 + 0.1*i)
   SetOperatorOptions(iso_atts)
   # For moviemaking, you'll need to save off the image
   # SaveWindow()