Hey all.(adsbygoogle = window.adsbygoogle || []).push({});

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.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Normal distribution and star density in a Galaxy

Loading...

Similar Threads - Normal distribution star | Date |
---|---|

B Probability density of a normal distribution | Jan 6, 2017 |

Normal distribution curve area? | Nov 5, 2015 |

Need help with normal distribution | Jul 16, 2015 |

Curve fitting of summed normal distributions | Jun 4, 2012 |

Normal distribution vs.exponential | Apr 16, 2012 |

**Physics Forums - The Fusion of Science and Community**