640 |
self.initcode() |
self.initcode() |
641 |
elif k == "0": |
elif k == "0": |
642 |
self.film() |
self.film() |
643 |
elif k == "p": |
elif k == "Print": |
644 |
makeScreenshots() |
makeScreenshots() |
645 |
|
|
646 |
def film(self): |
def film(self): |
783 |
class StillMotionScene: |
class StillMotionScene: |
784 |
def __init__(self, type = 0, flag = 0): |
def __init__(self, type = 0, flag = 0): |
785 |
self.scale = 700 |
self.scale = 700 |
786 |
self.x0, self.y0 = -.35, -.65 |
self.x0, self.y0 = -.4, -.6 |
787 |
self.x1, self.y1 = .35, .65 |
self.x1, self.y1 = .4, .6 |
788 |
self.xs, self.ys = .6,.4 |
self.xs, self.ys = .6,.4 |
789 |
self.a1 = 0 |
self.a1 = 0 |
790 |
self.flag = flag |
self.flag = flag |
791 |
|
|
792 |
if flag == 1: |
if flag == 1: |
793 |
self.x0, self.y0 = -.35, -.65 |
pass |
794 |
self.x1, self.y1 = .35, .65 |
#self.x0, self.y0 = -.35, -.65 |
795 |
self.xs, self.ys = .6,.4 |
#self.x1, self.y1 = .35, .65 |
796 |
|
#self.xs, self.ys = .6,.4 |
797 |
|
|
798 |
shape = 10 |
shape = 10 |
799 |
if type == 1: shape = 7 |
#if type == 1: shape = 7 |
800 |
texscale = 1 |
texscale = 2 |
801 |
linewidth = 4 |
linewidth = 5 |
802 |
refsize = 128 |
refsize = 128 |
803 |
scale_pow = 0 |
scale_pow = 0 |
804 |
border0 = -.5 * ripple_scale * texscale |
border0 = -.125 |
805 |
border1 = .5 * ripple_scale * texscale |
border1 = .125 |
806 |
texslicing = 0.0 |
texslicing = 0.0 |
807 |
|
|
808 |
if type == 1: |
if type == 1: |
953 |
self.scale * 1) |
self.scale * 1) |
954 |
vs.matcher.add(cs1, "1") |
vs.matcher.add(cs1, "1") |
955 |
|
|
956 |
for i in 0,1,2,3: |
for i in range(0,5): |
957 |
|
|
958 |
cs2 = vs.coords.affineCoordsys( |
cs2 = vs.coords.affineCoordsys( |
959 |
0, 0, self.x1 + .02 * i, self.y1, |
0, 0, self.x1 + .015 * i, self.y1, |
960 |
self.xs * cos(self.a1), self.ys * -sin(self.a1), |
self.xs * cos(self.a1), self.ys * -sin(self.a1), |
961 |
self.xs * sin(self.a1), self.ys * cos(self.a1) ) |
self.xs * sin(self.a1), self.ys * cos(self.a1) ) |
962 |
|
|
963 |
vs.matcher.add(cs2, "2." + str(i)) |
vs.matcher.add(cs2, "2." + str(i)) |
964 |
|
|
965 |
alpha = (.2, .3, .6, 1)[i] |
alpha = (.2, .4, .6, .8, 1)[i] |
966 |
if self.flag: |
if self.flag: |
967 |
self.putedge2(vs, cs1, cs2, alpha) |
self.putedge2(vs, cs1, cs2, alpha) |
968 |
else: |
else: |
987 |
# other parameters are hardcoded |
# other parameters are hardcoded |
988 |
# with if's in StillMotionScene class |
# with if's in StillMotionScene class |
989 |
|
|
990 |
if 0: |
if 1: |
991 |
w.setLocation(0,0,1024,768) |
w.setLocation(0,0,1024,768) |
992 |
## pre-computed angles |
## pre-computed angles |
993 |
#ps = StillMotionScene(type = "0b", flag = 1) |
#ps = StillMotionScene(type = "0b", flag = 1) |
994 |
#r(ps, "shots/motion0b.png") |
#r(ps, "shots/motion0b.png") |
995 |
|
|
996 |
ps = StillMotionScene(type = 0) |
#ps = StillMotionScene(type = 0) |
997 |
|
#r(ps, "shots/motion.png") |
998 |
|
ps = StillMotionScene(type = 1) |
999 |
r(ps, "shots/motion.png") |
r(ps, "shots/motion.png") |
1000 |
|
|
1001 |
ps = StillMotionScene(type = 0, flag = 1) |
#ps = StillMotionScene(type = 0, flag = 1) |
1002 |
r(ps, "shots/motion0.png") |
#r(ps, "shots/motion0.png") |
1003 |
ps = StillMotionScene(type = 1, flag = 1) |
#ps = StillMotionScene(type = 1, flag = 1) |
1004 |
r(ps, "shots/motion1.png") |
#r(ps, "shots/motion1.png") |
1005 |
|
|
1006 |
if globals().has_key("texHILO"): |
#if globals().has_key("texHILO"): |
1007 |
ps = StillMotionScene(type = 2, flag = 2) |
# ps = StillMotionScene(type = 2, flag = 2) |
1008 |
r(ps, "shots/motion2.png") |
# r(ps, "shots/motion2.png") |
1009 |
|
|
1010 |
|
|
1011 |
if 1: |
if 0: |
1012 |
w.setLocation(0,0,600,600) |
w.setLocation(0,0,600,600) |
1013 |
|
|
1014 |
ps = ShapeScene(type = 0) |
ps = ShapeScene(type = 0) |