Slides for spherical mirror full dome projection
Slides to fisheyeWritten by Paul Bourke
An alternative, April 2006
This utility converts slides or perspective images for fulldome display using one of the many possible mappings. The particular mapping used attempt to optimise the trade off between maximising resolution, create a reasonable field of view, and minimising distortion. The geometric model is to imagine the image on a plane that extends from the pole of the fisheye to the horizon, inclined at 45 degrees. The width of the plane will be chosen such that the aspect ratio is preserved.
This implementation will transform both TGA (default) and JPG images. The format of the input image and the output image is determined from the file name extension, namely ".tga" or ".jpg". In the later case the compression quality may be chosen, the highest quality is 100 (the default). Supersampling antialising is employed, typically values of 2 (the default) or 3 are appropriate. A single image will be converted by default but if the file name contains a "C" style string substitution string "%d" then a sequence of sequentially numbered files will be converted. In both cases the output files will have the same name as the input files but with the string "_fish" added.Command line usage
Usage: slide2fish [options] imagefilename Options: -d enable verbose debug mode (default: quiet mode) -a n set antialias level, 1 upwards, 2 or 3 typical (default: 2) -w n width of the fisheye image, height = width (default: 500) -q n set the output quality (jpeg only), 0 to 100 (default: 100) -n n set the start frame number if convering a sequence (default: 1) If the imagefilename contains a C style %d then an entire sequence of files will be converted. For example if the slides are called slide00.tga slide01.tga slide02.tga .... Then the command line might be something like this slide2fish -a 2 -n 0 -w 2200 slide%02d.tgaExample 1
Mapping images into fisheye space so they appear to be on an upright cylinder in a planetariumWritten by Paul Bourke
Aim is to map rectangular images onto a fisheye image such that when viewed in a planetarium the images appear to be wrapped onto cylindrical sections.
Choose the width and position in longitude for the image, this is theta1 and theta2. Also choose the latitude of the base of the image, for example, it might be 0 if the image is to start at the horizon. The image width and height are dx and dy in pixels. We need to determine phi2 such that the image appears in proprotion and upright in the dome.
The images are imagined to be wrapped around a cylinder.
Define "r" as the radius of the hemisphere in pixels = dx / (thet2 - theta1)
For the final fisheye image the goal is to find r1 and r2, once they are
known the x,y normalised coordinates of the four corners of the image
rectangle in the fisheye can be determined, namely
r1 = 2 (pi/2 - phi1) / pi
PovRay, or any other 3D rendering engine
Of course one can also accomplish this using your favourite 3D rendering/animation package as long as it supports fisheye rendering. Simply create the geometry you wish the image to be mapped onto in a 3D scene and render with a fisheye lens on a appropriately aligned camera. As example of this using PovRay is presented here: pov_billboard_4fisheye.zip. This approach makes it easy to animate the texture panels, the same approach is often used for text within a fulldome render. The example provided here takes the image below on the left and renders the image on the right, in a dome this will appear as a vertical pane.