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