I wrote a little bash script (my first) that does the following:
sed -e 's/Alpha=0/Alpha=x/' -e 's/Beta=0/Beta=y/' <file.pov >tmpfile.pov
povray Width=480 Height=360 +Itmpfile.pov +Ofile_x_y.png
everything works as intended, but now I would like to pack these two lines in a loop for x = 0: 30: 180 and y = 0: 30: 90 (change: I mean all possible combinations of x in {0, 30,60 , 90,120,180} and y in {0,30,60,90}).
So, for example, for x = 60 and y = 30, the code should behave as follows:
sed -e 's/Alpha=0/Alpha=60/' -e 's/Beta=0/Beta=30/' <file.pov >tmpfile.pov
povray Width=480 Height=360 +Itmpfile.pov +Ofile_60_30.png
I know this should not be too difficult, but for some reason, I just could not figure it out myself.
Sorry to bother you with your new questions!
source
share