aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unit_circle.sh8
-rw-r--r--voronoi.sh19
2 files changed, 24 insertions, 3 deletions
diff --git a/unit_circle.sh b/unit_circle.sh
index 40c834f..bab9ec6 100644
--- a/unit_circle.sh
+++ b/unit_circle.sh
@@ -1,13 +1,15 @@
#! /usr/bin/fish
-mkdir unit ^/dev/null
-cd unit
+mkdir unit_gif ^/dev/null
+cd unit_gif
rm *.ppm *.gif ^/dev/null
../unit_circle
for f in unit_circle_*
- convert $f -annotate +75+120 (echo "p =" (echo $f | grep -o "[0-9].[0-9]\{2\}" | head -n 1)) $f
+ convert $f -annotate +75+120 (
+ echo "p =" (echo $f | grep -o "[0-9].[0-9]\{2\}" | head -n 1)
+ ) $f
end
convert -delay 8 -loop 0 *.ppm circle.gif
diff --git a/voronoi.sh b/voronoi.sh
new file mode 100644
index 0000000..6d904a8
--- /dev/null
+++ b/voronoi.sh
@@ -0,0 +1,19 @@
+#! /usr/bin/fish
+
+mkdir voronoi_gif ^/dev/null
+cd voronoi_gif
+rm *.ppm *.gif ^/dev/null
+
+../voronoi
+
+for f in voronoi_*
+ convert $f -annotate +450+500 (
+ echo "p =" (echo $f | grep -o "[0-9].[0-9]\{2\}" | head -n 1)
+ ) $f
+end
+
+convert -delay 4 -loop 0 *.ppm voronoi.gif
+convert -reverse voronoi.gif voronoi_reversed.gif
+convert voronoi.gif voronoi_reversed.gif voronoi_cycle.gif
+
+cd ..