stellarium icon indicating copy to clipboard operation
stellarium copied to clipboard

provide lookout windows

Open axd1967 opened this issue 4 years ago • 17 comments

Is your feature request related to a problem? Please describe. As a user, I want to define "windows" so that I can figure out what I see when I would look through a window.

Describe the solution you'd like

I would like to be able to create a file windows.txt that defines windows (one per line).

A window is defined by a looking azimuth (eg 220), an elevation angle (eg 10 degrees), a horizontal opening angle (eg 160 degrees) and a vertical opening angle (eg 40 degrees).

Windos could overlap; it suffices to present an outline of a window.

Optionally a window also has a name (eg front, back, street, office, bathroom, ...), so that a set of windows on a screen can be identified with a small string just outside a window corner.

Each line will punch an opening in the sky.

Describe alternatives you've considered

An approximation is to define a horizon that optionally contains "dents" for where the windows are. This gives following results:

image A window looking towards 310

image Two "windows" (front and back side of an appartment), one looking west, one east.

axd1967 avatar Oct 26 '19 18:10 axd1967

If you make a panorama photograph, or plot an equivalent equirectangular map in Photoshop/GIMP and use a "spherical" landscape, you're done in 2-5 hours.

gzotti avatar Oct 26 '19 19:10 gzotti

Thank you. I tried this with the polar coordinate tool of Gimp; this works, but is very error-prone.

axd1967 avatar Oct 27 '19 19:10 axd1967

You can start with a 3600x1800px (azimuth x altitudes) image and cut your window holes in units of 10 pixels per degree.

gzotti avatar Oct 27 '19 19:10 gzotti

that is indeed what i did.

axd1967 avatar Oct 27 '19 20:10 axd1967

sigh... @gzotti do you have a definition of the labels in use? when I look at https://github.com/Stellarium/stellarium/labels/question, I see mostly problems; this issue is not a problem, but a simple and reasonable use case.

axd1967 avatar Oct 28 '19 20:10 axd1967

Hold the mouse over a label to see some more words of explanation. Labels esp. help us sorting out real problems (code demands) from other things. Your "this is what I did" indicates you worked out a solution based on the given suggestion, so I reclassified this one because a suggested workaround does 98% of what you want: a landscape with "windows", just not coded as text file. You can insist on a coded solution and wait until somebody creates it (wishlist=low priority for us. Don't hold your breath!), code it yourself and send us a patch that works, or work with the solution that already works. I hope you have found the required 2-5 hours (in reality, probably 25 minutes) in the meantime.

gzotti avatar Oct 28 '19 20:10 gzotti

Ah, thank you. I forgot about those descirptions.

IMHO I don't agree, and feel a bit bad because I disagree but don't want to bicker.

IMHO this is a nice wishlist item that might very well be implemented by someone else: as a developer, I want to contribute to this project. are there fresh ideas that I can implement?. But now, "question" looks like a workaround that needs no programming effort. Which is squarely wrong: I want the application to support me in a specific way, make my life easier, in this case I want to be able to describe the sky to someone I know is looking out a window in a specific direction.

But as a developer, I'm not going to look for questions so that I can answer them; that label is more for a community / "help desk", for users that are looking for an answer...

But if "wishlist" is long-term effort, this issue is not really a long-term effort either.

It looks like there is a strange set of criteria to group issues here, I need to adapt a bit, sorry for that. I know that grouping issues is an art.

axd1967 avatar Oct 28 '19 21:10 axd1967

I hope I can improve your feelings with a tag that states "we will not do it because we have other priorities, but you are cordially invited to solve it yourself (it is not overwhelmingly difficult) and send us a patch." I am still pretty sure that most users would prefer to paint an image as described. In this discussion the problem as specified has been worked around already without a line of code changed. There are several approaches to solutions. Whoever tackles this: Have a look into Polygonal Landscapes and expand on those.

gzotti avatar Oct 28 '19 21:10 gzotti

Hmmm... polygonal landscapes are fundamentally different (eg there is an ordering along the horizon, while windows float anywhere), I see no immediate way to reuse them.

axd1967 avatar Oct 28 '19 22:10 axd1967

I mean, look into SphericalRegion & friends, the building blocks required.

gzotti avatar Oct 28 '19 22:10 gzotti

A window is an open polygon with following properties:

  • name
  • polygon outline (az/alt pairs)
  • optional: color

axd1967 avatar Nov 10 '19 14:11 axd1967

another use case: our equatorial mount has limitations in minimum but also in maximum altitudes due to equipment that is piggybacked on the telescope. as a result, some az/alt combinations are prohibited and should be marked on the sky chart.

axd1967 avatar Jan 11 '20 14:01 axd1967

yet another use case: a Baader AllSky Dome can be partially opened; what part of the sky is visible then. A transparant window system can help here, to delineate the outline of the viewable sky..

axd1967 avatar Apr 25 '20 08:04 axd1967

possible workaround

it looks like the polygon plotting routine seems to handle well the vertices.

here is a quick and dirty test. I defined a "wall" of 80 degrees high (90 should be fine too), with a 20x10 degrees "window" centered on az/el 050/45.

image

image

# wall
000 80
045 80

# a window
045 50
040 50
040 40
060 40
060 50
045 50

045 80
060 80
090 80
180 80
270 80

image

this signifies that an unlimited amount of windows can be drawn, and names of windows added. I also noticed that when the polygon wraps over itself, it creates additional holes due to the plotting operator used. this could be exploited when cleverly arranging the order of vertices.

axd1967 avatar Sep 04 '20 15:09 axd1967

the approach is not entirely bug-free. here is a horizon that (agreed, not supported, so no real complaints) seems to have issue

045 90
#090 90
#135 90
#180 90

# window
167 90
167 80

# extra
135 80
120 80
090 80

087 80
087 00
247 00
247 80

# extra?
215 80
180 80

167 80
167 90

180 90
270 90
360 90

image

So it looks like there might be some reordering of the vertices before being drawn. maybe this reordering is not needed, even if a "landscape" could be assumed to be an ordered set of az/el data.

axd1967 avatar Sep 05 '20 18:09 axd1967

Another example (but there is no guarantee that this actually works, or is an unintended "feature"): a "roof":

image

90.1 0
92 0
95 0
100 0
105 0
135 0
150 3
179.9 3
180 03.01
180.1 03
185 03
200 03

205 0
215 0

# experimental: roof
215 0
215 88
305 88
035 88
125 88
215 60
125 60
035 60
305 60
215 60
215 0


220 0
225 0

230 0
230 5
269 6
275 5
275 0

310 0
315 0
320 0
330 0

# boom
340 0
340 4
000 4

#000 3
359.9 0
0.0 0.01
0.1 0
45 0
89.9 0
90 0.01

axd1967 avatar Oct 19 '21 13:10 axd1967

This is a good task for the community to participate in the contribution into Stellarium. Who wants to help us?

alex-w avatar Aug 02 '22 16:08 alex-w