-
Notifications
You must be signed in to change notification settings - Fork 0
/
laser.py
executable file
·90 lines (74 loc) · 2.47 KB
/
laser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/python
import os
import sys
import math
pbsGen= "./pbsGen.py"
executable = "volumerender.py"
execName = "renderLaser"
pbsName = "laser"
picDir = "/home/zwelch/819/ZWELCH_819/renderer/pics/"
extension = "exr"
def CmdLineFindIndex( tag ):
for i in range(len(sys.argv)):
if sys.argv[i] == tag:
return i
return -1
def CmdLineFind( tag, defaultvalue ):
i = CmdLineFindIndex(tag)
if i > 0:
if i < len(sys.argv)-1:
return sys.argv[i+1]
return defaultvalue
ds = float(CmdLineFind("-ds",.01))
jobLabel = "finalLaser"
frame = 266
while frame <= 315:
padframe = str(frame)
if frame < 1000:
padframe = "0" + padframe
if frame < 100:
padframe = "0" + padframe
if frame < 10:
padframe = "0" + padframe
command = pbsGen + " -script " + executable + " -frame " + str(frame) + " -job " +str(jobLabel) + " -execName "+execName + " -pbsName "+pbsName + " -extras" + " -fname " + picDir + jobLabel +"/"+jobLabel +"."+ str(padframe) + "." + extension + " -ds " + str(ds) + " -frame " + str(frame)
print command
frame += 1
os.system(command)
'''
for gamma in gammas:
for octave in octaves:
for fjump in fjumps:
for freq in freqs:
padframe = str(frame)
if frame < 1000:
padframe = "0" + padframe
if frame < 100:
padframe = "0" + padframe
if frame < 10:
padframe = "0" + padframe
command = pbsGen + " -script " + executable + " -frame " + str(frame) + " -job " +str(jobLabel) + " -execName "+execName + " -pbsName "+pbsName + " -extras" + " -NX 960 -NY 540 -fname " + picDir + jobLabel +"/"+jobLabel +"."+ str(padframe) + "." + extension + " -ds " + str(ds) + " -octaves " + str(octave) + " -fjump " + str(fjump) + " -freq " + str(freq)+ " -pyroGamma " + str(gamma)
print command
frame += 1
os.system(command)
angle = 0.0
theta = 360.0 / float(frames)
radius = 25
frame = 0
while angle < 360.0:
rad_angle = angle * math.pi/180.0
cosine = math.cos(rad_angle)
sine = math.sin(rad_angle)
camera = [ radius * sine, 0, radius*cosine ]
digits = 1
padframe = str(frame)
if frame < 1000:
padframe = "0" + padframe
if frame < 100:
padframe = "0" + padframe
if frame < 10:
padframe = "0" + padframe
command = pbsGen + " -script " + executable + " -frame " + str(frame) + " -job " +str(jobLabel) + " -extras -ds " + str(ds) + " -camera " + str(camera[0]) + " " + str(camera[1]) + " " + str(camera[2]) + " -fname " + picDir + jobLabel + str(padframe) + "." +extension
print command
frame += 1
angle += theta
os.system( command )'''