Stars in sky given arbitrarily sized/oriented window

In summary, you can calculate the stars in a given range by using the azimuth and elevation angles of an observer looking out the window. If you want to rotate the window, you need to recalculate the angles for each new orientation.
  • #1
Phil A
3
0
Hi All,
I've been taking a bit of a crash course in astronomy for a raspberry pi project I'm toying with. I basically want to create a window to the night sky without the actual window but a screen to replace it. Barring the practicality (psh, who needs that) of doing this, it's been a lot of fun learning all this stuff.

I've gotten to the point where given any lat/lng and time, I can calculate all the stars in the night sky from horizon to horizon. And I think given just a window with a squared up vertical/horizontal orientation, I can also calculate the stars in that range, even if the window moves up in elevation from the horizon.
My math for this is something like:
Assume the observer looking out is in the center of the window and estimate the distance to the window to get the angle of the observer's line of sight relative to the vertical window side. Doubling this (since your observer is centered) creates a range of azimuth angles.
Do something similar but with the horizontal window sides to get your range of elevation angles. Any stars that are within these ranges are visible through the window.

1) Is my math correct for this?
2) Now let's say I were to give the window an arbitrary orientation so that my vertical sides and horizontal window sides are tilted by X degrees, what does my math become then?

If an added visualization is needed, I think this problem is similar to how Star Walk is able to handle my tilting the phone one way or the other. How the heck is it able to calculate what stars are just ahead?

Thanks for any help you can provide!
 
Astronomy news on Phys.org
  • #2
Hi there Phil

Welcome to PF :smile:

you know there are already quite a number of phone apps that do this sort of thing ?

Stellarium, Heavens Above ... to name a couple

cheers
Dave
 
Last edited:
  • #3
Hi davenn,
Thanks for the response! And yep, Star Walk does this as well and was probably a seed of inspiration for the project, but that doesn't stop me from wanting to implement it myself. I think the problem is I don't even know what to google for or what branch of mathematics to start reading up on. Even some direction there would probably be very helpful.
 
  • #4
I think that some decent knowledge of undergrad math (Linear Algebra, Trigonometry, Calculus) along with some spherical trigonometry is a good start. I recommend an old book I've already studied named Spherical Astronomy by W.M.Smart. You can download it from archive.org: https://archive.org/details/SphericalAstronomy. As davenn pointed out, there are already quite a number of apps out there - I have Stellarium on my desktop and I think, it would be a good idea to become sufficiently acquainted with some well established app before you make your own. You can see what it offers in detail and maybe discover or anyway understand some additional things, that you may want to incorporate to your app.
 
  • #5
Phil A said:
Hi davenn,
Thanks for the response! And yep, Star Walk does this as well and was probably a seed of inspiration for the project, but that doesn't stop me from wanting to implement it myself. I think the problem is I don't even know what to google for or what branch of mathematics to start reading up on. Even some direction there would probably be very helpful.
I guess I'm confused about what the problem is: if you've already "calculate[d] all the stars in the night sky", then you are basically already finished setting-up the math. You just need a different cutoff to your sky globe than you are using (a small window instead of half the sky).
 
  • #6
Sorry for any confusion, let me try to clarify. Also, if this isn't the right forum for this, let me know. It starting to feel like it might actually be a graphics programming problem.

Let's say I have a rectangular window sitting at 45 degrees elevation. The bottom and top "frames" of the window are parallel with the plane of the horizon. Using the azimuth and elevation, I believe it's fairly easy to tell what stars are visible through the window, as described in the first post. Now, let's say there's an invisible centerline from an observer to the stars, halfway between the vertical sides and the horizontal sides, and we rotate that window by 20 degrees about the centerline, I'm no longer sure how to tell what stars are visible through the window.

My eventual goal if I can get past the technical stuff is to be able to map the brightest stars to a matrix of LEDs and I'd like to be able to arbitrarily place that anywhere. It will most likely be at a vertical/horizontal orientation but for the completionist in me, I'd like to understand how the math changes when I rotate it about the centerline axis and ideally implement that as well.

Edit: I've been using the word elevation, but I think most people call it altitude. I'm still getting the hang of the nomenclature.
 
Last edited:

FAQ: Stars in sky given arbitrarily sized/oriented window

What factors affect the number of stars visible in the sky through a window?

The number of stars visible in the sky through a window depends on several factors, including the size of the window, its orientation, and the viewer's location on Earth. The amount of light pollution in the area and the weather conditions can also impact the visibility of stars.

Can the size and orientation of a window affect the clarity of stars viewed through it?

Yes, the size and orientation of a window can affect the clarity of stars viewed through it. A larger window will allow for a wider field of view, making it easier to see more stars. The orientation of the window can also impact the angle at which the stars are viewed, potentially affecting their clarity.

Are there certain types of windows that are better for viewing stars?

Generally, windows with less distortion and better clarity, such as those made of high-quality glass, will provide a clearer view of stars. Additionally, windows with larger surface areas and those that can be opened to reduce reflections and glare may also be better for viewing stars.

Is there a specific time of day or year that is best for viewing stars through a window?

The best time for viewing stars through a window will depend on the location of the viewer and the movement of celestial bodies. However, in general, the best time for viewing stars is during the night when the sky is dark and clear. Certain times of the year, such as during meteor showers, may also provide better opportunities for viewing stars.

Are there any tools or techniques that can enhance the visibility of stars through a window?

There are various tools and techniques that can enhance the visibility of stars through a window. For example, using a telescope or binoculars can magnify the stars, making them appear brighter and clearer. Additionally, using a star map or an app that can help identify and locate stars can also enhance the viewing experience.

Similar threads

Back
Top