Sampling with multidimensional transformations

In summary, the ray should be shot vertically from a point, but depending on the situation it can be shot in any direction in the hemisphere above the point, shot with an angle of no more than σ off the vertical, or shot with an angle of no more than σ off the vertical by with a Gaussian distribution.
  • #1
Cbas
4
0
I am not sure if I have the title right, but here is my problem:
I have a ray which 'should be' shot vertically from a point p, but depending on the situation it can: 1) either be shot in any direction in the hemisphere above p 2) shot with an angle of no more than σ off the vertical 3) shot with an angle of no more than σ off the vertical by with a Gaussian distribution
(See http://imgur.com/BMqWjoQ)
http://imgur.com/BMqWjoQ

First:
I wish to generate a point uniformly distributed on a hemisphere. I did some derivations and I came up with:
θ = acos(R1)
∅= 2∏R2
x = sinθcos∅=cos(2∏R2)sqrt(1-R12)
y = sinθsin∅=sin(2∏R2)sqrt(1-R12)
z=cosθ=R1
I confirmed this wit a textbook, So I am pretty sure its right---
Second:
I want to generate a point uniformly but only within a small solid angle subtended by angle σ
Similar derivation as before but the values for theta and phi are
θ=acos(1-(1-cos(σ)*R1))
∅= 2∏R2
Im pretty sure this is also right

Third:
(now this is where I need help)
Instead of using a uniform distribution I would like to use a Gaussian distribution. I know Box Muller is one way of generating random number with a normal distribution (given a set of canonical numbers) but how do I use that now to generate ray directions that are normally distributed?

Thanks for your help
 
Physics news on Phys.org
  • #2
Can you do rejection sampling? The "best" implementation would depend on details of the parameters. "Use the second algorithm and reject the point with probablility 1-(value of gaussian)" should give reasonable results if the gaussian is not too narrow.

Alternatively, generate a random number based on the modified distribution f(θ)=sin(θ)*gaussian
 
  • #3
mfb said:
Alternatively, generate a random number based on the modified distribution f(θ)=sin(θ)*gaussian

What do you mean by "gaussian"? Is that one of my gaussian random numbers?
I assume sin(theta) is measure of area
Area = ∫0σ0sin(θ) Z1dθd∅

(thanks for your reply)
 
  • #4
sin(θ) is (proportional to) the length of a circle around the vertical axis. It is just a weight for the gaussian distribution. I don't know if you want that gaussian as function of θ, or the projection on the floor, or whatever, just use what you like there. As function of θ, it gets $$f(\theta)=\sin(\theta)\exp\left(\frac{-\theta^2}{2\sigma^2}\right)$$
Where σ is the width of the gaussian.
 
  • #5
.I would suggest using a multidimensional transformation to generate points with a Gaussian distribution. This method involves transforming a set of uniformly distributed points into points with a Gaussian distribution.

One way to do this is by using the Box-Muller transform, which involves taking two uniformly distributed points and transforming them into two points with a Gaussian distribution. This can be extended to generate points in higher dimensions.

To generate points within a small solid angle, you can first use the method you described for generating points uniformly within a hemisphere, and then use the Box-Muller transform to transform those points into points within the desired solid angle. This can be done by scaling and shifting the points to fit within the desired range of angles.

Overall, using a multidimensional transformation can provide a more efficient and accurate way to generate points with a Gaussian distribution compared to using a uniform distribution and trying to modify it to fit the desired distribution. Additionally, this method can easily be extended to generate points in higher dimensions if needed.
 

1. What is sampling with multidimensional transformations?

Sampling with multidimensional transformations is a statistical method used to collect data from multiple dimensions or variables. It involves transforming the original data into a new set of variables that are easier to analyze and interpret.

2. Why is sampling with multidimensional transformations important?

Sampling with multidimensional transformations allows researchers to reduce the complexity of their data while still retaining the important information. It also helps to identify patterns and relationships between variables, making it easier to draw meaningful conclusions from the data.

3. How does sampling with multidimensional transformations work?

In sampling with multidimensional transformations, the original data is transformed using mathematical techniques such as principal component analysis or factor analysis. This results in a smaller set of variables that capture most of the variation in the original data.

4. What are the benefits of using sampling with multidimensional transformations?

Sampling with multidimensional transformations can help to reduce the number of variables in a dataset, making it easier to analyze and interpret. It also helps to identify underlying patterns and relationships between variables, making it easier to draw meaningful conclusions from the data.

5. Are there any limitations to using sampling with multidimensional transformations?

While sampling with multidimensional transformations can be a useful tool, it is not suitable for all types of data. It works best with large datasets and may not be effective for small or highly skewed datasets. Additionally, the interpretation of the transformed data may be more complex and may not always accurately reflect the original data.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
777
  • Introductory Physics Homework Help
Replies
5
Views
882
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
704
Replies
12
Views
343
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
519
Back
Top