Skip to content

Commit

Permalink
Add bash scripts for tutorial 6 (#36)
Browse files Browse the repository at this point in the history
Co-authored-by: Esteban82-HP <SU-CORREO-ELECTRONICO0>
  • Loading branch information
maxrjones authored Dec 8, 2024
1 parent e7282a9 commit be100a9
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 0 deletions.
10 changes: 10 additions & 0 deletions book/tut6_scripts/0_earth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Making animations
# Step 1. Make first image.
# Step Goal: Create the first image of the animation.




gmt begin Earth png
gmt grdimage @earth_relief_06m -I -JG0/0/13c
gmt end
12 changes: 12 additions & 0 deletions book/tut6_scripts/1_earth_animation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Making animations
# Step 2. Make master frame.
# Step Goal: Make a master frame that looks identical to the first image.
# 1st attempt.


cat << 'EOF' > main.sh
gmt begin
gmt grdimage @earth_relief_06m -I -JG0/0/13c
gmt end
EOF
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -Chd -T360 -M0,png
12 changes: 12 additions & 0 deletions book/tut6_scripts/2_earth_animation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Making animations
# Step 2. Make master frame.
# Step Goal: Make a master frame that looks identical to the first image.
# 2nd attempt. Fix the canvas


cat << 'EOF' > main.sh
gmt begin
gmt grdimage @earth_relief_06m -I -JG0/0/13c -X0 -Y0
gmt end
EOF
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx80 -T360 -M0,png
12 changes: 12 additions & 0 deletions book/tut6_scripts/3_earth_animation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Making animations
# Step 3. Make draft animation
# Step Goal: See that the video file is created properly.
# See that the frames are changing as expected.
# 1st attempt. Reduce size and quality

cat << 'EOF' > main.sh
gmt begin
gmt grdimage @earth_relief_06m -I -JG0/0/13c -X0 -Y0
gmt end
EOF
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx30 -T10 -M0,png -Fmp4 -Zs
12 changes: 12 additions & 0 deletions book/tut6_scripts/4_earth_animation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Making animations
# Step 3. Make draft animation
# Step Goal: See that the video file is created properly.
# See that the frames are changing as expected.
# 2nd attempt. Use parameter

cat << 'EOF' > main.sh
gmt begin
gmt grdimage @earth_relief_06m -I -JG-${MOVIE_FRAME}/0/${MOVIE_WIDTH} -Y0 -X0
gmt end
EOF
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx30 -T10 -M0,png -Fmp4 -Zs
12 changes: 12 additions & 0 deletions book/tut6_scripts/5_earth_animation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Making animations
# Step 4. Make full animation
# Step Goal: Get the final animation.
# Increase number of frames (-T) and movie quality (-C).


cat << 'EOF' > main.sh
gmt begin
gmt grdimage @earth_relief_06m -I -JG-${MOVIE_FRAME}/0/${MOVIE_WIDTH} -Y0 -X0
gmt end
EOF
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx80 -T360 -M0,png -Fmp4 -Zs

0 comments on commit be100a9

Please sign in to comment.