So now that I have something ‘visible’ to show, instead of just internal changes, I thought I’d post an update on my progress with KStars and OpenGL.
In part due to the disorganized nature of the existing codebase and in part due to my under-estimation of some things (not to mention Hofstadter’s Law) I ended up not getting as much done as I’d have liked, because I spent a lot — maybe even a bit too much — time refactoring. What I did is to get rid of all calls to QPainter in the individual SkyComponent::draw() functions, and replaced them with calls to a SkyPainter class that acts as an interface, allowing one to draw things on the sky without regard to the actual backend. The actual drawing is done by either a SkyQPainter or a SkyGLPainter, but the sky components (e.g., stars, deep sky objects, constellation lines, &c.) don’t know anything about how the drawing is actually done.
As you can see from the pictures, most of the sky objects work. The things that need ‘fixing’ are the milky way (sort of), the labels, the images of planets, the images of deep sky objects, the overlays, and the horizon. I also have to make the two backends (GL and QPainter) play nice with each other. The Milky way “sort of” needs fixing because of different assumptions made by QPainter and OpenGL: QPainter does not require that polygons be convex, while GL does. After I solve the issues listed above, I am going to try to implement light pollution simulation and improve the drawing speed.
I made a map of the various parts of Reddit, which I’m posting here in case anyone’s interested. The code was written in hacky Python using BeautifulSoup; the graph was created with graphviz and rendered with Inkscape. When producing the graph, I filtered out all of the subreddits that didn’t link to anyone else, and also I filtered out some other subreddits I didn’t like that were messing up the structure of the graph.
There seems to be one main group that includes all the big subreddits, and also some smaller, higher-quality ones; a cluster of Linux/open-source subreddits; and a cluster of music subreddits. More than that I can’t say; it’s likely that there exist other clusters isolated from the rest of reddit.
Hello Planet KDE!
My name is Henry de Valence and I’m a first year student at Queen’s University at Kingston, Canada. This summer I’ll be working on KStars as a SoC project, aiming to make the graphics look much more realistic without sacrificing speed. To do this, we’ll use OpenGL. Since not all computers have good OpenGL capabilities, and we don’t want to ruin performance on those computers, we are going to keep the current painting system as an option.
So what does “visual realism” entail? Essentially, it means that if I have KStars running on my computer, I should be able to get KStars to resemble the sky as I can see it. KStars already does this fairly well in that it can calculate the position of all the stars in the sky given the time and my location. What KStars isn’t so good at is the visual display of this. If I load KStars, I see a black sky dotted with stars. If I look outside the window, I see a dark navy blue sky with only a few stars. In order to make it realistic, we need to account for light pollution and the colours of the sky. Fortunately, there are a number of papers that describe these techniques, and an implementation of some of them in Stellarium, so my work is mostly cut out for me.
Anyways, I’m looking forward to getting things done this summer, with the end result being a more beautiful KStars!