Best way to simulate star sizes to scale in celestial sphere Using the Hipparcos catalogue, I am trying to create a celestial sphere. As all the stars are a fixed distance from the centre of this sphere, the only way to differentiate the distances and magnitude is through the sizing of each model of the star.

With the Parallax angle $p$ and visual magnitude $m_{vis}$ of each star from the catalogue, I have created the code below to calculate the radius of each star relative to the radius of the sun. I had used this website to calculate this. The problem is that some stars are too big, almost bigger than the celestial sphere itself! I am trying to keep the radius below a certain threshold.

Here $p$ is in arcseconds and $d$ is in parsecs.

$$d = 1 / p$$

$$M_{abs} = M_{vis} - \log_{10}(d^5) + 5$$

$$ T_{surf} = \frac{8540}{CI + 0.865}$$

$$R_{rel} = \left( \frac{5800}{T_{surf}} \right)^2 \sqrt{(2.512)^{4.83 - M_{abs}}}$$

$$R_{Sun} = 2.5$$

$$r = R_{rel} R_{Sun}$$

    private void positionStar()
    {
        double radius;
        cartesianPositioningCalc();
        gameObject.transform.position = cartesianPositioning;

        // Convert Plx from milliarcseconds to arcseconds (seconds of arc)
        double PlxSOA = Plx / 1000;
        // Calculate distance from equation d=1/p
        // distance d is measured in parsecs and the parallax angle p is measured in arcseconds.
        double dPC = 1 / PlxSOA;

        double absMag = Vmag - math.log10(math.pow(dPC, 5)) + 5;

        surfaceTemperature = 8540 / (CI + 0.865);

        double relativeRadius = math.pow((5800 / surfaceTemperature), 2) * math.sqrt((math.pow(2.512, (4.83 - absMag))));
        double radiusSun = 2.5f;

        radius = relativeRadius * radiusSun;

        gameObject.transform.localScale = new Vector3((float)radius, (float)radius, (float)radius);
    }


First of all, am I using the right mathematics? If I am, then how can I make sure that the radius is below a certain maximum threshold (5 units, for example.)?

If the mathematics is incorrect, please assist me on how to fix it.

Thanks!



With a slightly modified version of @Mike G's formula in their answer below:



radius = 50 * math.pow(10, (-1.44 - Vmag) / 5);


I was able to get this result:


And if I'm not mistaken, I think I can locate the Ursa Major constellation offset slightly to the left from the centre of the screenshot.

However, after uploading to nova.astrometry.net the stars and constellations are still not being picked up. Is this because the star sizing is still a bit incorrect or is this issue on the website's side?

I can use another website/app such as Stellarium to cross-check, is there a way the app can process an input image or do I try to recreate using my image on the app?
Your maths looks ok, bar the fact that $1/$parallax is a biased estimate of the distance (but that can be forgiven so long as you are using data where the parallax uncertainties are much smaller than the parallax).

Your main problem is that stars do indeed have a vast range of sizes. Thus if you really do want to show the relative sizes of the stars you have a dynamic range problem.

The conventional way to deal with this would be to use a logarithmic scale, such that each increment in size corresponds to a multiple of the one below. e.g. Make your plotted radii proportional to $\log_{10} R_{\rm rel}$.

EDIT: In response to altered emphasis of question.

It seems you no longer want to scale the stars according to their actual radius, but rather according to their brightness. The logarithmic scaling is therefore already handled by the apparent magnitude (which is on a logarithmic scale).

Therefore all you need to do is decide what your smallest and largst radius are and compare that with the brightest and faintest magnitudes you want to plot.

e.g. If your biggest star is 5 units and your smallest is 0 units, and your bright and faint limits are $m_{\rm bright}$ and $m_{\rm faint}$ respectively, then the size of an arbitrary star of magnitude $m$ is
$$ r =\frac{5(m -m_{\rm faint})}{m_{\rm bright} -  m_{\rm faint}} \ .$$

And if you want your faintest stars to be size 1 and brightest to be 5, this modifies to
$$ r =\frac{4(m -m_{\rm faint})}{m_{\rm bright} -  m_{\rm faint}} +1 \ .$$

Yet another alternative would be to make the area proportional to magnitude. Again, scaling between radii of 5 and 1:

$$ r^2 =\frac{24(m -m_{\rm faint})}{m_{\rm bright} -  m_{\rm faint}} +1 \ .$$