Normal distribution and star density in a Galaxy

In summary, the conversation discusses the use of a 2D density map for a spiral galaxy and the attempt to expand it into a 3rd dimension using a normal distribution to distribute density values. The conversation also covers the parameters of a normal distribution, including the mean and standard deviation, and the use of a library function to determine the fraction of stars in each sector. The conversation ends with a request for the source of the 2D density map.
  • #1
corndog16
1
0
Hey all.

I'm working on a personal programming project where I'm attempting to simulate (to a small degree) a galaxy. And I have come across a decent 2D density map for a spiral galaxy. This map (array actually) defines a 128x128 grid of values between 0 and 255 representing the frequency of stars found in that 'sector' of space.

I want to expand this density map into the 3rd dimension and I figure a good way to do that would be to define the height of the galaxy as being n sectors tall and then use a normal distribution curve to distribute the density value (something between 0 and 255) vertically across those 5 sectors.

My question is, how would I take a number, say 234, and divide it among n 'boxes' or 'sectors' so that it has a normal curve type distribution?
I attempted to Google this, but I found that what was coming up did not describe what I was looking for so I'm thinking that I don't currently have the vocabulary to describe this particular intent.
 
Mathematics news on Phys.org
  • #2
corndog16 said:
My question is, how would I take a number, say 234, and divide it among n 'boxes' or 'sectors' so that it has a normal curve type distribution?

A normal distribution has two parameters, the mean [itex] \mu [/itex] and the standard deviation [itex] \sigma [/itex]. Let's say we have 128 boxes. Imagine the boxes as spaces between a ruler that has marks at 0,1,2,..128. Assuming you want the middle of the distribution to be at the middle of the ruler, set [itex] \mu = 64 [/itex].

Then you have to decide on a value for [itex] \sigma [/itex]. A normal distribution has non-zero values from [itex] - \infty [/itex] to [itex] +\infty [/itex], so you have to decide what part of the distribution you are going to leave out or you have to settle for a distribution that doesn't exactly match a normal distribution by forcing all of the stars to be within the 128 boxes.

For most programming languages, you can find a library with a function that give the values of the cumulative normal distibution. Let's assume that such a function is

[itex] F(\mu,\sigma,x) = \int_{-\infty}^x f(\mu,\sigma,x) dx [/itex] where [itex] f(\mu,\sigma,x) [/itex] is the density of a normal distribution.

The fraction of stars between marks [itex] A [/itex] and [itex] B [/itex] on the ruler is

[itex] F(64,\sigma,B) - F(64,\sigma,A) [/itex].

So the fraction of stars between the 0 and 128 marks is

[itex] M = F(64,\sigma,128) - F(64,\sigma,0) [/itex]

The fraction that are outside those marks is [itex] 1 - M [/itex].

The fraction of stars in the kth box is [itex] s_k = F(64,\sigma,k) - F(64,\sigma,k-1) [/itex]. If you want to "renormalize" so that all the stars fall in the marks between 0 and 128, you can make the fraction of stars in the kth box [itex] \frac{s_k}{1-M} [/itex]

For 234 total stars, the number of stars in the kth box will be [itex] (s_k)(234) [/itex]. So it won't always be a whole number. To convert to a while number, you'll have to decide how to round things off. (If you want the grand total to remain 234, you'll have to round off in a special way!)

The above calculations don't determine a unique value for [itex] \sigma [/itex]. You'll have to try various values to find one that you like if your goal is only to have a pleasing picture. If you are doing a physical simulation of moving stars, we'll have to investigate the problem further.
 
  • #3
Hi,
Any chance you could post your source for the 2D Density Map you have? I'm looking for exactly that
Thanks
Dave
 

1. What is a normal distribution?

A normal distribution, also known as a Gaussian distribution, is a statistical distribution that is symmetrical and bell-shaped. It is characterized by a mean and standard deviation, and the majority of data points fall within one standard deviation of the mean.

2. How is normal distribution related to star density in a galaxy?

In astronomy, the distribution of stars in a galaxy can often be approximated by a normal distribution. This means that the majority of stars in a galaxy are located near the center, with fewer stars at the edges. However, there are also variations and fluctuations in star density that can deviate from a perfect normal distribution.

3. How is star density measured in a galaxy?

Star density in a galaxy is typically measured by counting the number of stars in a given area or volume. This can be done using telescopes and other instruments, as well as through computer simulations and models.

4. What factors can affect star density in a galaxy?

There are many factors that can affect star density in a galaxy, including the age and size of the galaxy, the presence of dark matter, and the activity of star formation. Additionally, mergers and interactions with other galaxies can also affect the distribution of stars.

5. Can star density in a galaxy change over time?

Yes, star density in a galaxy can change over time due to various factors. For example, as a galaxy continues to evolve and age, the distribution of stars may shift, and new stars may form in different areas. Additionally, events such as supernovae and mergers can also alter the density of stars in a galaxy.

Similar threads

  • Advanced Physics Homework Help
Replies
1
Views
568
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
Replies
72
Views
5K
  • Astronomy and Astrophysics
Replies
4
Views
2K
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Replies
15
Views
2K
  • Art, Music, History, and Linguistics
Replies
4
Views
765
  • Advanced Physics Homework Help
Replies
4
Views
1K
Back
Top