I made an animation of a flight from New York to Venice.
I also have a question. How can I remove the effect (jittery?) of the front of the line? I try with -H2,4,8 and changing the resolution (DPU) without luck. Any idea/suggestion?
Full script (I am amazed on how few lines are needed).
#!/usr/bin/env bash
DPU=1080p
title=Anim_Jones_$DPU
cat << 'EOF' > pre.sh
gmt begin
# Escalas del viaje
cat << 'FILE' > cities.txt
40.711913, -74.007135, New York
47.561598, -52.712229, St Johns (Terranova)
37.741556, -25.696368, Sao Miguel (Azores)
38.775808, -9.135406, Lisboa (Portugal)
45.502971, 12.342151, Venecia (Italia)
FILE
gmt sample1d "cities.txt" -I10.66k -fg -i1,0 | gmt mapproject -G+uk > "temp_timefile.txt"
# Convertir linea para graficar
gmt events -Rd "temp_timefile.txt" -Ar${MOVIE_DPU} > temp_line_points.txt
gmt end
EOF
cat << 'EOF' > main.sh
gmt begin
gmt coast -R-800/800/-450/450+uk -JG${MOVIE_COL0}/${MOVIE_COL1}/24c -Bg0 -Yc -Xc -Df -G200 -Sdodgerblue2 -N1/0.2,-
gmt events temp_line_points.txt -Ar -T${MOVIE_COL2} -Es -W2p,red
gmt end
EOF
# Movie: Crear figuras y animacion. Opciones C: Canvas Size. G: Color fondo.
gmt movie "main.sh" -Sb"pre.sh" -N$title -T"temp_timefile.txt" -C$DPU -Vi -Ml,png -Fmp4
This is wonderful, @Esteban82 ! Just so I understand, by jittery here you mean the red line growing in short spurts and not smoothly and continuously as the rest? My guess (without trying anything) is that the line is not sampled finely enough?
Don’t know, I would try to change one at the time to see if it makes any difference. How did you pick 10.66k?
The Nepal one I suspect has a date line issue. Does it look like that if you just make a static plot of all of the temp_timefile.txt or temp_line_points.txt?
So I tested the output from sample1d and mapproject and they both are fine. Then I did events and it worked fine to make the final file. So I think the input files are OK. So things go wrong inside the movie loop over frames. Since you posted everything I will take this a bit further and fine a master frame that breaks down. BTW, I thought having the DPU being 1080p and not 1080 was the problem but it did not care there, but not sure if movie parses it the same way. So try removing the ‘p’ and see if there is any change.
I ran your first Venice movie and while there might be a tiny bit of jittery in my local result it is not anything like the jittery in the youtube posting. Does it run jittery if you play it locally on your computer?
Now it works. I use the following command (I add -JG-185/0/15c). I wonder what would happens is the lines goes on the west up to San Francisco. The same issue would appear again?