Skip to content

Commit be100a9

Browse files
authored
Add bash scripts for tutorial 6 (#36)
Co-authored-by: Esteban82-HP <SU-CORREO-ELECTRONICO0>
1 parent e7282a9 commit be100a9

6 files changed

+70
-0
lines changed

book/tut6_scripts/0_earth.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Making animations
2+
# Step 1. Make first image.
3+
# Step Goal: Create the first image of the animation.
4+
5+
6+
7+
8+
gmt begin Earth png
9+
gmt grdimage @earth_relief_06m -I -JG0/0/13c
10+
gmt end
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Making animations
2+
# Step 2. Make master frame.
3+
# Step Goal: Make a master frame that looks identical to the first image.
4+
# 1st attempt.
5+
6+
7+
cat << 'EOF' > main.sh
8+
gmt begin
9+
gmt grdimage @earth_relief_06m -I -JG0/0/13c
10+
gmt end
11+
EOF
12+
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -Chd -T360 -M0,png
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Making animations
2+
# Step 2. Make master frame.
3+
# Step Goal: Make a master frame that looks identical to the first image.
4+
# 2nd attempt. Fix the canvas
5+
6+
7+
cat << 'EOF' > main.sh
8+
gmt begin
9+
gmt grdimage @earth_relief_06m -I -JG0/0/13c -X0 -Y0
10+
gmt end
11+
EOF
12+
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx80 -T360 -M0,png
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Making animations
2+
# Step 3. Make draft animation
3+
# Step Goal: See that the video file is created properly.
4+
# See that the frames are changing as expected.
5+
# 1st attempt. Reduce size and quality
6+
7+
cat << 'EOF' > main.sh
8+
gmt begin
9+
gmt grdimage @earth_relief_06m -I -JG0/0/13c -X0 -Y0
10+
gmt end
11+
EOF
12+
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx30 -T10 -M0,png -Fmp4 -Zs
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Making animations
2+
# Step 3. Make draft animation
3+
# Step Goal: See that the video file is created properly.
4+
# See that the frames are changing as expected.
5+
# 2nd attempt. Use parameter
6+
7+
cat << 'EOF' > main.sh
8+
gmt begin
9+
gmt grdimage @earth_relief_06m -I -JG-${MOVIE_FRAME}/0/${MOVIE_WIDTH} -Y0 -X0
10+
gmt end
11+
EOF
12+
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx30 -T10 -M0,png -Fmp4 -Zs
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Making animations
2+
# Step 4. Make full animation
3+
# Step Goal: Get the final animation.
4+
# Increase number of frames (-T) and movie quality (-C).
5+
6+
7+
cat << 'EOF' > main.sh
8+
gmt begin
9+
gmt grdimage @earth_relief_06m -I -JG-${MOVIE_FRAME}/0/${MOVIE_WIDTH} -Y0 -X0
10+
gmt end
11+
EOF
12+
gmt movie main.sh -NEarth -V -L+f14p,Helvetica-Bold,white -Gblack -C13cx13cx80 -T360 -M0,png -Fmp4 -Zs

0 commit comments

Comments
 (0)