Skip to content

Commit

Permalink
Add awsrun and test changes to test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nistath committed Oct 29, 2019
1 parent 9cef922 commit 7bd9ddb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# AWSRUN
log.awsrun

# Prerequisites
*.d

Expand Down
13 changes: 6 additions & 7 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
C1 = np.hstack(C1)
C0 = np.hstack(C0)
T = np.hstack(T).T
print('Told\n', T)

U = R.T
P = O.T
Expand All @@ -109,21 +108,21 @@
assert(np.isclose(c1, C1).all())
assert(np.isclose(c0, C0).all())

ddds = np.sqrt(c1**2 - c0*c2)
ddd = c1**2 - c0*c2
ddds = np.sqrt(ddd)


low_soln = (-c1-ddds)/c2
high_soln = (-c1+ddds)/c2
# T = np.minimum(low_soln, high_soln)[..., np.newaxis]
print('T\n', T)
T = np.minimum(low_soln, high_soln)[..., np.newaxis]

if True:
#prune solutions that aren't in bounds of cone we are considering
height_condition = delta.T @ D + np.multiply(U.T @ D, T)
satisfies_cond = np.all((height_condition >= 0, height_condition <= h), axis = 0).flatten()
T = T[satisfies_cond]
O = O[satisfies_cond]
R = R[satisfies_cond]
T[np.logical_not(satisfies_cond)] = 1337
print('T\n', T)
exit()
rays = np.hstack((O, R))

# Solution for plane
Expand Down

0 comments on commit 7bd9ddb

Please sign in to comment.