Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
9745d192
Commit
9745d192
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
9a06bec5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demos/anim-all.script
+4
-2
4 additions, 2 deletions
demos/anim-all.script
demos/anim.script
+0
-81
0 additions, 81 deletions
demos/anim.script
with
4 additions
and
83 deletions
demos/anim-all.script
+
4
−
2
View file @
9745d192
...
...
@@ -11,7 +11,6 @@
General.GraphicsWidth = 320 ;
General.GraphicsHeight = 240 ;
PostProcessing.Link = 1;
For i In {1:View[0].NbTimeStep}
...
...
@@ -28,7 +27,10 @@ For i In {1:View[0].NbTimeStep}
Print Sprintf("anim-%g.jpg", i);
Print Sprintf("anim-%g.gif", i);
EndIf
View[0].TimeStep++;
For j In {1:PostProcessing.NbViews}
View[j-1].TimeStep++;
EndFor
EndFor
...
...
This diff is collapsed.
Click to expand it.
demos/anim.script
deleted
100644 → 0
+
0
−
81
View file @
9a06bec5
//
// This is a generic 320x240 mpeg + animated gif creation script
//
// Requirements: mpeg_encode, whirlgif and a UNIX shell
//
// Usage: gmsh file(s) anim.script
//
// Output: anim.mpg and anim.gif
//
General.GraphicsWidth = 320 ;
General.GraphicsHeight = 240 ;
PostProcessing.Link = 1;
For i In {1:View[0].NbTimeStep}
Draw;
If (i < 10)
Print Sprintf("anim-00%g.jpg", i);
Print Sprintf("anim-00%g.gif", i);
EndIf
If (i >= 10 && i < 100)
Print Sprintf("anim-0%g.jpg", i);
Print Sprintf("anim-0%g.gif", i);
EndIf
If (i >= 100)
Print Sprintf("anim-%g.jpg", i);
Print Sprintf("anim-%g.gif", i);
EndIf
View[0].TimeStep++;
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 8" >> anim.par' ;
System 'echo "PQSCALE 10" >> anim.par' ;
System 'echo "BQSCALE 25" >> anim.par' ;
System 'echo "REFERENCE_FRAME ORIGINAL" >> 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' ;
If (View[0].NbTimeStep < 10)
System Sprintf('echo "anim-*.jpg [001-00%g]" >> anim.par', View[0].NbTimeStep) ;
EndIf
If (View[0].NbTimeStep >= 10 && View[0].NbTimeStep < 100)
System Sprintf('echo "anim-*.jpg [001-0%g]" >> anim.par', View[0].NbTimeStep) ;
EndIf
If (View[0].NbTimeStep >= 100)
System Sprintf('echo "anim-*.jpg [001-%g]" >> anim.par', View[0].NbTimeStep) ;
EndIf
System 'echo "END_INPUT" >> anim.par' ;
// Call mpeg_encode
System "mpeg_encode anim.par" ;
// Call whirlgif
System "whirlgif -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");
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment