# Tag Info

Accepted

• 4,862
Accepted

### How is the D value being updated at simple RRT algorithm?

I don't think $D$ is updated at all. It is just a temporary value for $D_{exp}$ times uniform random value in [0,1]. As a general remark, RRT means Rapidly-exploring Random Tree. Hence, the algorithm ...

### How to plot random points in 3 dimensions in order to calculate volume of a torus through Monte Carlo integration

You don't need to plot a torus to calculate its volume. Moreover you can analytically compute the volume integral and it's even on wikipedia. With Monte Carlo you can use rejection sampling to figure ...
• 2,122
Accepted

### Grid walk vs. uniform random weights for bounded grid

Not every method that seems reasonable leads to an algorithm that is competitive. In your case, if you want to draw uniform random numbers from $[0,1]^2$, you could use a method that is based on ...
• 55.5k
Accepted

### Changing randomly a unit vector

What youâ€™re seeing is a basic acceptance-rejection method. $\Delta S$ generated in that way will be uniform in the ball of radius $\Delta S_{\text{max}}$ centered at the origin. Added I imagine you're ...
1 vote
Accepted

### Random access (quasi-?)random sequence

There's a paper by Gruenschloss about enumerating Sobol points falling within some elementary intervals: https://github.com/lgruen/sample-enum This is used in pbrt with the global sampler in order to ...
1 vote

### How to sample points uniformly over a region of the unit sphere

So if I correctly understand, you know how to sample in the "vertical" cone, and you ask how to rotate? Here is some pseudo-code to get the unit quaternion representing a rotation sending a ...
1 vote

### Optimization on MCMC codes

The Julia probabilistic programming libraries like Turing.jl work on abstract array types and use the Julia automatic differentiation tooling, so if you write your model as something that uses CUDA.jl ...
• 12.3k
1 vote

### Generating Random Orthogonal Matrices in C++

If $X$ is a $(n \times m)$-matrix whose entries are independently generated values from the standard normal distribution, then $X(X^{\top}X)^{-\frac12}$ is a uniformly generated random orthogonal ...
1 vote

### Monte Carlo - Random Walk Simulation - polyfit the log log data points?

If I understood the first image correctly, you should do a linear fit with $\ln(N)$ being the independent variable and, presumably, $\ln(d)$ the dependent variable. Furthermore, it seems to me that ...
1 vote

### Uniform dots distribution in a sphere

There is a nice document: M. Deserno, "How to generate equidistributed points on the surface of a sphere" which basically summarizes the two easiest methods to generate a distribution of points on a ...
• 8,672
1 vote

### Sampling simulation steps logarithmically

If you want your sampling over the (a,b) interval to appear uniform when viewed on a log-log scale, linearly interpolate the logarithms: ...
• 4,862
1 vote

Find a vector $\vec a$ such that $\vec v \times \vec a \ne 0$. Define $\hat x = (\vec v\,\times \vec a)/||\vec v \times \vec a||$. By construction, $\hat x$ is a unit vector and is orthogonal to $\vec ... • 111 1 vote ### How to choose a good distribution for visualizing phase changes in the nature of the roots of a quadratic equation Well, for the visualization of the discrete and real/imaginary character of the roots, you can simply do a 3D plot of $$\frac{-b\pm \sqrt{b^2-4ac}}{2a}$$ against$a$,$b$, and$c$. This will give ... • 151 1 vote Accepted ### (numpy/scipy) Build a random vector given mean vector and covariance matrix If random vector$X$has variance$S$, then$LX$has variance$LSL^\top$. So generate whatever random variables with mean 0 and identity covariance matrix, then transform it$LX+\mu$, where$\mu\$ is ...
• 482

Only top scored, non community-wiki answers of a minimum length are eligible