-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjulia4.sh
executable file
·43 lines (41 loc) · 1.54 KB
/
julia4.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
_FRACTAL_NAME_="Julia4"
_SIZE_=2048
_ITERATION_=200
_FOLDER_="julia4"
if [ "$#" -ge 1 ]; then
if [ "$1" != "-p" ]; then
echo "-p --palette-name <name>"
echo " Nom de la palette :"
echo " Red"
echo " Green"
echo " Blue"
echo " Gray"
else
if [ "$#" -ge 2 ]; then
echo "Construction de la fractale en cours..."
if [ -d $_FOLDER_ ]; then
echo "Le dossier $_FOLDER_ existe déjà."
else
echo "Création du dossier $_FOLDER_..."
mkdir $_FOLDER_
fi
if [ "$2" = "Red" -o "$2" = "Green" -o "$2" = "Blue" -o "$2" = "Gray" ]; then
java -jar fractales-base.jar -f $_FRACTAL_NAME_ -h $_SIZE_ -n $_ITERATION_ -o $_FOLDER_/$_FOLDER_-0.png -p $2 -s 0.02048 -w $_SIZE_ -x 0 -y 0
java -jar fractales-base.jar -f $_FRACTAL_NAME_ -h $_SIZE_ -n $_ITERATION_ -o $_FOLDER_/$_FOLDER_-1.png -p $2 -s 0.002048 -w $_SIZE_ -x 0 -y 0
java -jar fractales-base.jar -f $_FRACTAL_NAME_ -h $_SIZE_ -n $_ITERATION_ -o $_FOLDER_/$_FOLDER_-2.png -p $2 -s 0.0002048 -w $_SIZE_ -x 0 -y 0
else
echo "[EREUR] Ce nom de palette n'existe pas."
fi
else
echo "[ERREUR] Il faut mettre le nom de la palette."
fi
fi
else
echo "-p --palette-name <name>"
echo " Nom de la palette :"
echo " Red"
echo " Green"
echo " Blue"
echo " Gray"
fi