unitary-blinn.py 385 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import math

f = open('unitary-blinn.data', 'w+')

# Generate the header of the file in the ALTA format
f.write("#DIM 1 1\n")
f.write("#PARAM_IN COS_TH\n")
f.write("#PARAM_OUT INV_STERADIAN\n")

def blinn(cost, sigma):
	return math.pow(cost, sigma);
#endif

for i in range(0,99):
	theta = i * 0.01

17
	val = 2.1 * blinn(theta, 3.14);
18 19 20

	f.write(str(theta) + "\t" + str(val) + "\n");
#end