MRaster examples 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
doublePendulumM.cpp File Reference

For each pixel, simulate a double pendulum system over 2sec and color the pixel according to the pendulum end state. More...

Go to the source code of this file.

Detailed Description

For each pixel, simulate a double pendulum system over 2sec and color the pixel according to the pendulum end state.

Author
Mitch Richling https://www.mitchr.me
Standards
C++20
Details

This code makes a movie of time steps of the solution the double pendulum equations. For the equations, see doublePendulum.cpp.

In this program we solve solve the equations over a time span of 10 seconds using 1000 steps of Euler's method. We dump out an image for each step.

Make Movies:

       ffmpeg -y -framerate 15 -i doublePendulumM_center_%4d.tiff -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf 30 -b:v 0 -pix_fmt yuv420p doublePendulumM_center_100_crf30.mp4;
       ffmpeg -y -framerate 15 -i doublePendulumM_center_%4d.tiff -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf  3 -b:v 0 -pix_fmt yuv420p doublePendulumM_center_100_crf01.mp4;
       ffmpeg -y -framerate 15 -i doublePendulumM_corner_%4d.tiff -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf 30 -b:v 0 -pix_fmt yuv420p doublePendulumM_corner_100_crf30.mp4;
       ffmpeg -y -framerate 15 -i doublePendulumM_corner_%4d.tiff -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf  3 -b:v 0 -pix_fmt yuv420p doublePendulumM_corner_100_crf01.mp4;

Definition in file doublePendulumM.cpp.