aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-01-28 11:03:10 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-01-28 11:03:10 -0500
commita7d6577e55ebd665ad9e4f45183836f11b3c6fd4 (patch)
treedd036ac439ceb577cc699f59a755667544d57539 /util
parent3319a58ecc391f9aac092ade45f9f50dc2af5aa6 (diff)
parent6341992254c837b1d814b3eaa24b2ab3e729c8e2 (diff)
Merge branch 'wind-behavior' into fridaydemo
Conflicts: behaviors/XYMove.py
Diffstat (limited to 'util')
-rw-r--r--util/Geo.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/Geo.py b/util/Geo.py
index 05ea9fe..0dde80b 100644
--- a/util/Geo.py
+++ b/util/Geo.py
@@ -26,3 +26,9 @@ def randomLoc(boundingBox): #TODO: make less shitty
def approxexp(x):
"""Approximates exp with a 3 term Taylor Series."""
return 1+x+x**2/2+x**3/6
+
+def windtrail(x,y,height,center,width):
+ a=height
+ b=center
+ c=width
+ return a*((math.exp(-((x-b))/(c)))**2)*(math.exp(-((y))/(0.2*c)))**2