source: util/src/OutputRaster3DHeader.py.in@ b4fa915

Last change on this file since b4fa915 was e1a46d, checked in by Frederik Heber <heber@…>, 16 years ago

All of my python script put into ESPACK and adapted with @PYTHON@ and so on.

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!@PYTHON@
2
3import sys
4wrerr=sys.stderr.write
5wrout=sys.stdout.write
6
7# check arguments
8if len(sys.argv) < 3:
9 print "Usage: "+sys.argv[0]+" <outputfile> <AtomCount>"
10 sys.exit(1)
11
12# get atomcount
13Atoms=int(sys.argv[2])
14
15# deduce r-factor
16factor=15.0 + (40.0-15.0)/2000*Atoms
17
18output = open(sys.argv[1], "w")
19output.write("Example of material properties and file indirection\n");
20output.write("80 64 tiles in x,y\n");
21output.write(" 8 8 pixels (x,y) per tile\n");
22output.write("4 3x3 virtual pixels -> 2x2 pixels\n");
23output.write("0 0 0 background colour\n");
24output.write("T cast shadows\n");
25output.write("25 Phong power\n");
26output.write("0.15 secondary light contribution\n");
27output.write("0.05 ambient light contribution\n");
28output.write("0.25 specular reflection component\n");
29output.write("0.0 eye position\n");
30output.write("1 1 1 main light source position\n");
31output.write("1 0 0 0 input coordinate, radius transformation\n");
32output.write("0 1 0 0\n");
33output.write("0 0 1 0\n");
34output.write("0 0 0 %5.2f\n" % (factor));
35output.write("3 mixed objects\n");
36output.write("*\n");
37output.write("*\n");
38output.write("*\n");
39
Note: See TracBrowser for help on using the repository browser.