Skip to content

Commit

Permalink
add: script to generate all fractals
Browse files Browse the repository at this point in the history
  • Loading branch information
daelsepara committed Oct 23, 2023
1 parent 4e47554 commit face1f9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/create_universe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
FRACTALS=`ls parameters/*.json | grep -v 'biomorph' | grep -v mandelbrot | cut -d'/' -f2 | cut -d'.' -f1`
BIOMORPHS=`ls parameters/biomorph-*.json | cut -d'/' -f2 | cut -d'-' -f2 | cut -d'.' -f1`
PALETTES=`ls palettes/*.json | cut -d'/' -f2 | cut -d'.' -f1`

# create biomorph universe
for j in ${BIOMORPHS}; do mkdir -p universe/biomorphs/$j; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/biomorph-$j.json /palette=palettes/$i.json /image=universe/biomorphs/$j/$j-$i.png; done; done;
for j in ${BIOMORPHS}; do mkdir -p universe/biomorphs/$j; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/biomorph-$j.json /palette=palettes/$i.json /image=universe/biomorphs/$j/$j-$i-inverted.png /invert; done; done;

# create mandelbrots
for j in mandelbrot mandelbrot4; do mkdir -p universe/fractals/$j-histogram; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j-histogram/$j-histogram-$i.png /histogram; done; done;
for j in mandelbrot mandelbrot4; do mkdir -p universe/fractals/$j-histogram; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j-histogram/$j-histogram-$i-inverted.png /histogram /invert; done; done;
for j in mandelbrot mandelbrot4; do mkdir -p universe/fractals/$j-log; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j-log/$j-log-$i.png /log; done; done;
for j in mandelbrot mandelbrot4; do mkdir -p universe/fractals/$j-log; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j-log/$j-log-$i-inverted.png /log /invert; done; done;
for j in mandelbrot-funcs mandelbrot-reciprocal; do mkdir -p universe/fractals/$j; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j/$j-$i.png; done; done;
for j in mandelbrot-funcs mandelbrot-reciprocal; do mkdir -p universe/fractals/$j; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j/$j-$i-inverted.png /invert; done; done;

# create fractal universe
for j in ${FRACTALS}; do mkdir -p universe/fractals/$j; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j/$j-$i.png; done; done;
for j in ${FRACTALS}; do mkdir -p universe/fractals/$j; for i in ${PALETTES}; do ./Fractals.exe /params=parameters/$j.json /palette=palettes/$i.json /image=universe/fractals/$j/$j-$i-inverted.png /invert; done; done;

0 comments on commit face1f9

Please sign in to comment.