aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-03-19 21:53:48 +0530
committerArun Isaac2021-03-19 21:57:31 +0530
commitfa2d088d31faef95d7b96d681fbf0b14cd444afa (patch)
tree80df5442d286cffd52df28b014a6c8c15f555969
parente4ca0edf037b924b217bd5c2223e570a8e888ee9 (diff)
downloadnsmc-fa2d088d31faef95d7b96d681fbf0b14cd444afa.tar.gz
nsmc-fa2d088d31faef95d7b96d681fbf0b14cd444afa.tar.lz
nsmc-fa2d088d31faef95d7b96d681fbf0b14cd444afa.zip
Demonstrate cone sampling with rejection sampling too.
* contrib/cone-vector.py (sample_code): Demonstrate cone sampling with rejection sampling too.
-rw-r--r--contrib/cone-vector.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/cone-vector.py b/contrib/cone-vector.py
index 1f1fb1d..95fe891 100644
--- a/contrib/cone-vector.py
+++ b/contrib/cone-vector.py
@@ -106,6 +106,7 @@ def sample_code():
axis = ones(dim)
axis = axis/norm(axis)
print(random_vector_on_spherical_cap_cdf(axis, maximum_planar_angle))
+ print(random_vector_on_spherical_cap_pdf(axis, maximum_planar_angle))
if __name__ == '__main__':
sample_code()