95 |
self.vecs = [[ rs * math.cos(as), rt * math.cos(at)], |
self.vecs = [[ rs * math.cos(as), rt * math.cos(at)], |
96 |
[ rs * math.sin(as), rt * math.sin(at)]] |
[ rs * math.sin(as), rt * math.sin(at)]] |
97 |
|
|
98 |
def _getSTVectors(self, rnd): |
def _getSTVectors(self, rnd=None): |
99 |
"""Get the 2 4-component vectors that (x,y,0,1) should |
"""Get the 2 4-component vectors that (x,y,0,1) should |
100 |
be multiplied by to get (s,t). |
be multiplied by to get (s,t). |
101 |
""" |
""" |
107 |
r = [[ f * mat[1][1], -f * mat[0][1], 0, "?"], |
r = [[ f * mat[1][1], -f * mat[0][1], 0, "?"], |
108 |
[ -f * mat[1][0], f * mat[0][0], 0, "?"]] |
[ -f * mat[1][0], f * mat[0][0], 0, "?"]] |
109 |
|
|
110 |
# Random offsets |
if rnd != None: |
111 |
r[0][3] = rnd.nextDouble() |
# Random offsets |
112 |
r[1][3] = rnd.nextDouble() |
r[0][3] = rnd.nextDouble() |
113 |
|
r[1][3] = rnd.nextDouble() |
114 |
|
|
115 |
return r |
return r |
116 |
|
|