Mathematica : Perlin like distribution on a sphere

In summary, to generate points on a unit sphere with a Perlin-like distribution, one can use the spherical coordinates system and convert uniform random variables into spherical coordinates using the equations provided.
  • #1
Barnak
63
0
I need to generate a set of random points on an unit sphere, using Mathematica. I can do it for a simple homogeneous (i.e. uniform) distribution of points using the following coordinates :

RandomPoints[u_, phi_] := {Sqrt[1 - u^2] Cos[phi], Sqrt[1 - u^2] Sin[phi], u},

with uniform random variables u in [-1, 1] and phi in [0, 2 Pi].

However, I would like to define a distribution that feels more "natural", i.e. Perlin-like (take note that I don't know how to define "Perlin noise", mathematically).

What do you suggest ?
 
Physics news on Phys.org
  • #2
One way to generate points on the unit sphere with a Perlin-like distribution is to use the spherical coordinates system. That is, we can define our uniform random variables u in [0, 1] and phi in [0, 2 Pi] and then convert them into spherical coordinates using the following equations:theta = acos(2u - 1)phi = 2Pi * phiRandomPoints[u_, phi_] := {Sin[theta] Cos[phi], Sin[theta] Sin[phi], Cos[theta]},This should give a more Perlin-like distribution of points on the unit sphere.
 

FAQ: Mathematica : Perlin like distribution on a sphere

1. What is a Perlin-like distribution on a sphere?

A Perlin-like distribution on a sphere is a way of mapping random points onto the surface of a sphere, using a mathematical algorithm based on the work of computer graphics pioneer Ken Perlin. This allows for the creation of a more natural and organic distribution of points compared to other methods.

2. How is a Perlin-like distribution on a sphere different from other types of distributions?

Unlike other types of distributions, such as uniform or Gaussian distributions, a Perlin-like distribution on a sphere takes into account the curvature and topology of the sphere and produces a more even distribution of points. It also has a more visually pleasing and natural appearance.

3. What are some practical applications of a Perlin-like distribution on a sphere?

A Perlin-like distribution on a sphere is commonly used in computer graphics and animation to generate realistic and natural-looking landscapes, terrains, and textures. It can also be used in scientific simulations, such as modeling the distribution of stars in a galaxy or the distribution of particles in a fluid.

4. How is a Perlin-like distribution on a sphere implemented in Mathematica?

In Mathematica, a Perlin-like distribution on a sphere can be implemented using the built-in function "SphereDistribution". This function takes in parameters such as the number of points to be distributed, the radius of the sphere, and the smoothness of the distribution. It also allows for the addition of other parameters to customize the distribution.

5. Are there any limitations or drawbacks to using a Perlin-like distribution on a sphere?

One limitation of using a Perlin-like distribution on a sphere is that it can be computationally expensive, especially when working with a large number of points or a high level of smoothness. Additionally, the resulting distribution may not be truly random and may show some patterns, which may not be desirable in certain applications. Therefore, it is important to carefully consider the purpose and requirements of the distribution before using it.

Similar threads

Replies
4
Views
2K
Replies
13
Views
2K
Replies
12
Views
4K
Replies
4
Views
2K
Replies
9
Views
3K
Replies
2
Views
1K
Replies
1
Views
2K
Back
Top