0
votes
1answer
55 views

Sample uniform direction within cone

My question is pretty much the same as this question below, however I came up with a potential solution to this problem that I didn't see an answer to in the other question and I was wondering if it ...
0
votes
1answer
19 views

Density on the square, expected value

Let $f: [0,1]^2 \rightarrow \Bbb R^{+}$ a density function on the square. I suppose that the random variable $X=(X_1,X_2)$ has the density f with respect to the lebesgue measure. I denote ...
1
vote
1answer
28 views

How to Create a Plane Inside A Cube

I have a $e \times e \times e$ cube and I want to create random planes with equation $ax + by + cz + d = 0$ inside this cube. I will put random points on those randomly created planes as well. Here ...
1
vote
0answers
52 views

Packing a larger sphere with smaller spheres in high dimensions

We were discussing today the probability of leaving a point uncovered while trying to fill a larger sphere by randomly throwing in smaller spheres. Here's the argument: We are working in ...
2
votes
1answer
183 views

Triangle Point Picking in 3D

To take random uniform points inside a triangle Triangle Point Picking method is used. But this is for 2D points, how can I take random points from a triangle that is defined by 3 arbitrary 3D points? ...
4
votes
2answers
151 views

Random number generation in $3D$

I have problem regarding random number generation. Suppose I have disc of radius $r$. $$ \begin{align} x&=r\cos(\theta)\\ y&=r\sin(\theta)\\ z&=0 \end{align} $$ I rotate the co-ordinate. ...
4
votes
2answers
132 views

Algorithm to generate an uniform distribution of points in the volume of an hypersphere/on the surface of an hypersphere.

I am searching two simple/efficient/generic algorithms to generate a uniform distribution of random points: in the volume of a n-dimensional hypersphere on the surface of a n-dimensional hypersphere ...
0
votes
1answer
49 views

Generate a Normal in 3D Without Branching?

I have a vector $v$ in arbitrary 3D space ending at point B. In order to generate the next point -- C, I uniformly pick an ...
3
votes
1answer
258 views

Mapping random points on a sphere onto a uniform grid

Say I had an arbitrary sphere that is covered in a uniform triangle mesh of N elements with each element having a unique sequential index. If given the coordinates of a random point on the surface of ...
0
votes
1answer
163 views

calculate surface normal with random sampling of points

Given a surface in $R^3$ and a point P on the surface, I want to calculate the surface normal in this point, the vector that is perpendicular to the surface. However, I do not know the whole surface, ...
0
votes
0answers
183 views

Uniform Random Points on a triangle using only edge plane normals

For a triangle $ABC$ in 3D (each point has x, y, z coordinates) is it possible to generate uniform random points on the triangle from only the following data: Normal of the triangle plane $N = ...
11
votes
3answers
5k views

Picking random points in the volume of sphere with uniform probability

I have a sphere of radius $R_{s}$, and I would like to pick random points in its volume with uniform probability. How can I do so while preventing any sort of clustering around poles or the center of ...
16
votes
7answers
3k views

Generate a random direction within a cone

I have a normalized 3D vector giving a direction and an angle that forms a cone around it, something like this: I'd like to generate a random, uniformly distributed normalized vector for a ...
25
votes
5answers
2k views

How to find a random axis or unit vector in 3D?

I would like to generate a random axis or unit vector in 3D. In 2D it would be easy, I could just pick an angle between 0 and 2*Pi and use the unit vector pointing in that direction. But in 3D I ...