1
$\begingroup$

This question came up as a tangent to another project. I'd appreciate help defining the question more clearly as well as grappling with a solution:

Suppose I want to write an algorithm to generate a "realistic" starfield. That is, the distribution of stars and their magnitudes in my 2d sky should be consistent with the distribution that would result if I populated a large 3d space with stars and then projected those stars onto the sky, accounting for the drop in magnitude with distance.

Assumptions:

All positions of stars can be assumed to have integer coordinates.

The distribution of stars in the 3d space is such that any given integer position has a fixed probability of containing a star.

The distribution of the magnitudes of the stars is a normal distribution (?) Or is there another probability distribution that would be a better choice?

If it makes the calculations easier, the starfield being generated can be assumed to be a rectangle, instead of radiation lines of sight from an observer.

Feel free to ask questions about anything unclear here: my first problem has been trying to rigorously define the question.

  • 0
    What's the range for magnitudes of the stars, real magnitude or $\{1,2,3,4,5,6\}$.2017-01-10
  • 0
    I would say real magnitudes. This doesn't necessarily have to correspond to the way actual stars work. The question has arisen in the context of two applications, both of which relate to procedural generation: 1) finding an efficient algorithm to procedurally generate skies that have similar statistical properties to the sky we actually see from earth, and 2) analyzing a particular sky image to determine if it is likely to actually occur in a randomly distributed galaxy of stars.2017-01-10
  • 0
    Am I understand? You want to spread many points (random numbers) in a rectangle $[0,n]\times[0,n]$ with integer coordinates which have two parameters $M$ (as magnitude) and $d$ (as distance).2017-01-10
  • 0
    That sounds right. In actual practice the distance parameter would only be used to modify M to get the apparent magnitude. The tricky thing is I want the distribution of these points and their magnitudes to match that which would result from projecting them all onto the rectangle from a random distribution in 3d space.2017-01-10
  • 0
    I Think one of your tags should be "algorithm" or "random distribution".2017-01-10

0 Answers 0