diff --git a/img/life.gif b/img/life.gif new file mode 100644 index 0000000..345def5 Binary files /dev/null and b/img/life.gif differ diff --git a/index.html b/index.html index cbeed67..7e0864b 100644 --- a/index.html +++ b/index.html @@ -1880,6 +1880,30 @@ + + + +
+

Conway's Game of Life

+

Simulates Conway's Game of Life

+

ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800

+
+
ffplay
starts the command
+
-f lavfi
tells ffplay to use the Libavfilter input virtual device
+
life=s=300x200
use the life filter and set the size of the video to 300x200
+
:
indicates there’s another parameter coming
+
mold=10:r=60:ratio=0.1
sets up the rules of the game: cell mold speed, video rate, and random fill ratio
+
:
indicates there’s another parameter coming
+
death_color=#C83232:life_color=#00ff00
specifies color for cell death and cell life; mold_color can also be set
+
,
comma signifies closing of video source assertion and ready for filter assertion
+
scale=1200:800
scale to 1280 width and 800 height
+
+ GIF of above command +

To save a portion of the stream instead of playing it back infinitely, use the following command:

+

ffmpeg -f lavfi -i life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800 -t 5 output_file

+ +
+

Use OCR