How to refract a point light on a custom atmospheric surface?

How can I refract a incoming light to a custom atmosphere?

In real life we have a such thing that people from different regions will see the different colors of the sun.
For example we have this picture with Point A and Point B.

Point A will see the sky in the red, orange and yellow tones.

Point B will see the sky in Blue

I’m working on a space engine, and want to refract the star’s light on the atmospheric surface.

Point A:

Point B:

Outside view:

All these 3 pictures were hand made, is there anyway that I can automate the refraction?

Basically the ambiance will change depending on the refraction