StereoView raster sizes

Steve Dempsey sdempsey at UCSD.EDU
Sat Aug 11 07:19:14 AEST 1990


Recently I was looking at some stereo images on a 340VGX with StereoView 
and I noticed that that they seemed slightly compressed along the vertical
axis.  I ran a test program to generate some rasters of a known size and
then measured the raster heights.  My initial assumption was that a raster
with a height of 492 pixels and displayed with setmonitor(STR_RECT) should have
the same height as a raster of 984 pixels displayed with setmonitor(HZ60).

Instead, I found that the stereo raster was about 6% smaller than I expected.
Now that I know the value of this factor I can adjust the aspect ratio
of my projection transformations to compensate, but I was wondering if
other people have seen this and if they measure the same shrinkage factor.

Here is the program I used to draw the rasters:

#include <gl.h>
#include <get.h>
#include <device.h>

main()
	{
	int	val, type;

	noborder();
	prefposition(0, 1279, 0, 1023);
	winopen("");
/*
* The middle mouse toggles between the two rasters
*/
	qdevice(MIDDLEMOUSE);
	type = 0;
	while(qread(&val))
	    {
	    if(val) continue;
	    type = !type;
	    if( type )
/*
* color a full screen stereo window area (1280x492 pixels),
* then switch the monitor to STEREO mode so the raster size can be measured.
*/
		{
		viewport(0, 1279, 0, 1023);
		color(BLUE);
		clear();
		color(RED);
		viewport(0, 1279, 0, 491);
		clear();
		viewport(0, 1279, 532, 1023);
		clear();
		setmonitor(STR_RECT);
		}
	    else
/*
* color a window area 984 pixels high, which should generate the same size
* raster as a 492 pixel window in Stereo mode.
*/
		{
		viewport(0, 1279, 0, 1023);
		color(BLUE);
		clear();
		color(GREEN);
		viewport(0, 1279, 20, 1003);
		clear();
		setmonitor(HZ60);
		}
	    }
	}
--------------------------------------------------------------------------------
Steve Dempsey						       (619) 534-0208
Dept. of Chemistry Computer Facility, B-014	   INTERNET:   sdempsey at ucsd.edu
University of Calif. at San Diego		     BITNET:   sdempsey at ucsd
La Jolla, CA 92093				       UUCP:   ucsd!sdempsey



More information about the Comp.sys.sgi mailing list