Skip to content
Snippets Groups Projects
Select Git revision
  • f9f5a96a25e3c926de6097451d3a55b0d59648a1
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

GModelIO_Mesh.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    anim-all.script 2.08 KiB
    //
    // Animate all views (together) and save the animation as a 320x240
    // mpeg and a 320x240 animated gif
    // 
    // Requirements: mpeg_encode, whirlgif and a UNIX shell
    //
    // Output: anim.mpg and anim.gif
    //
    
    General.GraphicsWidth = 320 ; 
    General.GraphicsHeight = 240 ;
    Print.JpegQuality = 100;
    
    For i In {1:View[0].NbTimeStep}
    
      Draw;
      Print Sprintf("anim-%03g.jpg", i);
      Print Sprintf("anim-%03g.gif", i);
    
      For j In {1:PostProcessing.NbViews}
        View[j-1].TimeStep++;
      EndFor
    
    EndFor
    
    // create the parameter file for mpeg_encode
    
    System 'echo "PATTERN          I"               > anim.par' ;
    System 'echo "BASE_FILE_FORMAT JPEG"           >> anim.par' ;
    System 'echo "GOP_SIZE         30"             >> anim.par' ;
    System 'echo "SLICES_PER_FRAME 1"              >> anim.par' ;
    System 'echo "PIXEL            HALF"           >> anim.par' ;
    System 'echo "RANGE            10"             >> anim.par' ;
    System 'echo "PSEARCH_ALG      TWOLEVEL"       >> anim.par' ;
    System 'echo "BSEARCH_ALG      CROSS2"         >> anim.par' ;
    System 'echo "IQSCALE          1"              >> anim.par' ;
    System 'echo "PQSCALE          10"             >> anim.par' ;
    System 'echo "BQSCALE          25"             >> anim.par' ;
    System 'echo "REFERENCE_FRAME  DECODED"        >> anim.par' ;
    System 'echo "OUTPUT           anim.mpg"       >> anim.par' ;
    System 'echo "INPUT_CONVERT    *"              >> anim.par' ;
    System 'echo "INPUT_DIR        ."              >> anim.par' ;
    System 'echo "INPUT"                           >> anim.par' ;
    System Sprintf('echo "anim-*.jpg [001-%03g]"   >> anim.par', View[0].NbTimeStep) ;
    System 'echo "END_INPUT"                       >> anim.par' ;
    
    // Call mpeg_encode
    
    System "mpeg_encode anim.par" ;
    
    // Call whirlgif
    
    System "whirlgif -minimize -loop -o anim.gif anim-*.gif" ;
    
    // Clean-up all temp files
    
    System "rm -f anim-*.gif" ;
    System "rm -f anim-*.jpg" ;
    System "rm -f anim.par" ;
    
    // One could also rename the output files with the view name
    
    // System StrCat( StrCat("mv anim.gif ", Sprintf(View[0].Name)), ".gif");
    // System StrCat( StrCat("mv anim.mpg ", Sprintf(View[0].Name)), ".mpg");