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