From fa2d088d31faef95d7b96d681fbf0b14cd444afa Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 19 Mar 2021 21:53:48 +0530 Subject: Demonstrate cone sampling with rejection sampling too. * contrib/cone-vector.py (sample_code): Demonstrate cone sampling with rejection sampling too. --- contrib/cone-vector.py | 1 + 1 file changed, 1 insertion(+) 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() -- cgit v1.2.3