Skip to content

Commit

Permalink
Updated plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Glatzel committed May 11, 2017
1 parent f05928a commit 906a965
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/pyplots/volumetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
far = 10000.0
volumeDepth = 128.0

def volumeZToDepth(depth):
return np.power(depth, exp) * far + near
def volumeZToDepth(z):
return np.power(z / volumeDepth, exp) * far + near

t1 = np.arange(0.0, 1.0, 0.1)
t1 = np.arange(0.0, volumeDepth, 1.0)

plt.plot(t1, volumeZToDepth(t1), 'bo', t1, volumeZToDepth(t1), 'k')
plt.ylabel('Depth')
Expand Down

0 comments on commit 906a965

Please sign in to comment.