1 | # Asteroid rendering shell script |
---|
2 | Inspired on [this tutorial](http://i-simplicity.de/tutorials.html), |
---|
3 | uses [povray](http://povray.org/) to render asteroids. Annoyingly povray |
---|
4 | doesn't do parameters, so hence the shell script. I have only run it on linux. |
---|
5 | |
---|
6 | ### Useage: |
---|
7 | export variables or define them right before the call. Defaults are intended |
---|
8 | to be reasonable. It will also output a file which indicates what the |
---|
9 | parameters where. |
---|
10 | |
---|
11 | ### Examples: |
---|
12 | |
---|
13 | sh asteroid.sh |
---|
14 | size=0.5 sh asteroid.sh |
---|
15 | lz = -800 sh asteroid.lsh |
---|
16 | |
---|
17 | ### Variables: |
---|
18 | |
---|
19 | w,h: width and height. (800,800) |
---|
20 | |
---|
21 | size: size of asteroid(<0.6 ok for otherwise default) (0.5) |
---|
22 | x,y,z: camera position. (17,0,0) |
---|
23 | angle: angle of view. (10) |
---|
24 | (has to be tuned with size and x,y,z) |
---|
25 | |
---|
26 | lx,ly,lz: light source position (500,500,800) |
---|
27 | to_pov: .pov file to output. (/tmp/`date +%s`.pov) |
---|
28 | to_png: .png file to output. (/output/`date +%s`.png) |
---|
29 | |
---|
30 | version: povray version. (3.7) |
---|
31 | |
---|
32 | ## Caveits |
---|
33 | Things could be better, no terrible shell-script, it is probably possible, but |
---|
34 | difficult, to turn the isosurface into a mesh, and also generate the texture. |
---|
35 | But that is a whole project on itself. |
---|
36 | |
---|
37 | There also some 'lines' sometimes when the 'crackle' that adds the craters |
---|
38 | superimposes two craters. |
---|
39 | |
---|
40 | # 'Extras' |
---|
41 | There is a little shell script to separate alpha from the rest. |
---|
42 | |
---|
43 | ## Author |
---|
44 | Jasper den Ouden |
---|
45 | |
---|
46 | ## License |
---|
47 | CC0, or public domain, whichever one chooses. |
---|