Wednesday, 23 April 2014

Fun with Domes (PART 2)

In my last blog post I talked about how I had started to investigate the positioning of the dome and I had found some areas of the sky where the galaxy camera was being obscured by the top of the dome.
What all of us had failed to realize up until this point (victims of our faith in Scott's mount model) was that the dome door actually doesn't end where it does in the model. It in fact goes up to the zenith and beyond. This is plainly obvious when looking at any pictures of the dome.

This rather invalidated the results. I modified the mount model to give it a more accurate dome polygon and re-ran the test and this showed that at no points in the sky was galaxy cam being obstructed by dome. Perfect.

The next logical step was to re-run the tests for constellation cam. Constellation cam is often affected by obstruction from dome. In some places this is a lot worse than others.

The dome clearly visible in this image of Orion
Being able to say with certainty where the good and bad areas of sky are for constellation cam would allow us to return much better images. It took a little bit of recoding to do more precise collision testing for constellation cam. (With galaxy cam, it was only necessary to check vectors around the edge of the light cylinder and get a yes/no result. Constellation Cam, with its pyramidal field of view rather than cylindrical one, needed every point across its view area checking and a percentage obstruction returning.

The initial results were clearly far too optimistic. They seemed to suggest that for most areas of the sky it should be possible to get images with no dome in them at all. This came down to two problems. The first was yet another error in the original mount model. In a careless mistake, the field of view pyramids were too small. Constellation Cam had been given a field of view of 40 degrees corner to corner, not edge to edge.

(It also turned out that constellation cam isn't even 40 degrees across right now. When I measured it myself it was closer to 50 degrees)

There was also another reason for the strangely optimistic results. This problem lead to a whole more interesting discovery. I upgraded the collision testing code to not only return a percentage obstruction but also to render what it thought the image should look like. I then compared some real images with the predictions of the model.

prediction overlaid on image.    - = clear    # = obstructed

In all the pictures tested, the model seemed to line up with a certain line visible on the dome but not the actual edge of it. That line is technically the edge of the inside of the dome. The bit missed by the collision detection is the dome door. What you have to imagine is that the dome is not a wafer thin shell with a gap in it, but rather a quite thick shell
The dome doors can obstruct the view even if the dome itself doesn't
So another flaw in the mount model then? Yes and no. I did fix the mount model by adding an extra dome layer to test collisions against (so a ray has to go through both the inside and outside gap to pass the visibility test). At this point I am rather starting to lose faith in the accuracy of the mount model but still soldiering on with it. I calculated the relevant numbers from schematics of the dome to make sure the dimensions of the gap were all correct.
I am so getting this as a poster
En route to these numbers I happened to also discover that the clear swing radius of the telescope dome, with the shutters open (that’s the radius of the circle that must be left clear so that the outside of the dome doesn't hit anything as it spins) is exactly the same as the height of Tom Cruise. But I digress.

After I did that, the simulated images started matching up with the real ones much better. However, this assumption that the dome is a wafer thin shell is not only present in the 3D mount model but also in the mathematics of the dome position algorithm. Finally an opportunity presents itself to improve things.