From 30104d8ee20733cf4e2195ef9a6cd202a7a257e5 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 16 Mar 2021 15:01:45 +0530 Subject: Deal in solid angle fractions, not absolute solid angles. * src/extent-sampling.sc (volume-cone): Use solid-angle-fraction->planar-angle instead of solid-angle->planar-angle. * src/nd-random.sc (planar-angle->solid-angle): Rename to planar-angle->solid-angle-fraction and return a solid angle fraction. (solid-angle->planar-angle): Rename to solid-angle-fraction->planar-angle and accept a solid angle fraction. (hollow-cone-random-vector): Use planar-angle->solid-angle-fraction instead of planar-angle->solid-angle. (beta-inc-unnormalized, incomplete-wallis-integral): Delete functions. * include/nd-random.h (planar_angle_to_solid_angle): Rename to planar_angle_to_solid_angle_fraction. (solid_angle_to_planar_angle): Rename to solid_angle_fraction_to_planar_angle. * scm/nsmc/wrap.scm (planar-angle->solid-angle): Rename to planar-angle->solid-angle-fraction. --- include/nd-random.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/nd-random.h b/include/nd-random.h index 9755e57..3d3c298 100644 --- a/include/nd-random.h +++ b/include/nd-random.h @@ -30,7 +30,7 @@ void random_direction_vector (const gsl_rng* r, gsl_vector* x); void cone_random_vector (const gsl_rng* r, const gsl_vector* mean, double theta_max, gsl_vector* x); void hollow_cone_random_vector (const gsl_rng* r, const gsl_vector* mean, double theta_min, double theta_max, gsl_vector* x); -double planar_angle_to_solid_angle (double planar_angle, unsigned int dimension); -double solid_angle_to_planar_angle (double solid_angle, unsigned int dimension); +double planar_angle_to_solid_angle_fraction (double planar_angle, unsigned int dimension); +double solid_angle_fraction_to_planar_angle (double solid_angle, unsigned int dimension); #endif -- cgit v1.2.3