2011-12-12 19:13:01 -04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# simple test of wind generation code
|
|
|
|
|
2012-03-22 08:50:47 -03:00
|
|
|
import util, time, random
|
2012-10-30 20:26:48 -03:00
|
|
|
from rotmat import Vector3
|
2011-12-12 19:13:01 -04:00
|
|
|
|
2012-10-30 20:26:48 -03:00
|
|
|
wind = util.Wind('7,90,0.1')
|
2011-12-12 19:13:01 -04:00
|
|
|
|
|
|
|
t0 = time.time()
|
2012-03-22 08:50:47 -03:00
|
|
|
velocity = Vector3(0,0,0)
|
2011-12-12 19:13:01 -04:00
|
|
|
|
|
|
|
t = 0
|
|
|
|
deltat = 0.01
|
|
|
|
|
|
|
|
while t < 60:
|
2012-10-30 20:26:48 -03:00
|
|
|
print("%.4f %f" % (t, wind.drag(velocity, deltat=deltat).length()))
|
2011-12-12 19:13:01 -04:00
|
|
|
t += deltat
|