In article <6t5ea5$du0$1@nnrp1.dejanews.com>, rmlongfield@my-dejanews.com wrote:
> Hi All,
> I put Stein's examples in an idl procedure producing 4 windows
and run it on:
> print,!version { mipseb IRIX unix 5.0 Apr 28 1997}
>
> I get good results for IDL Windows 0,1 and 3 but see the gaps in window 2,
> which is NOT the same window where Stein got his gaps. David Fanning's
> Windows NT gets no gaps? Well, maybe something with Unix then, but
> inconsistent over different platforms. Anybody try it with Linux?
On MacOS, it's related to window size. Only Window 1 has no gaps with a
400x400 window. Changing to a 320x320 window shows gaps only in window 2.
Changing to 512x512 shows no gaps.
I changed stein_test to allow you to pass in window sizes. I'm on a laptop
with an 800x600 screen this morning. There were no gaps in the original
display because the window size was 400x300. Of course, I couldn't see
anything because it was drawing off the screen. The yOff value will plot
the lines in the middle of the screen.
print, !Version
{ PowerMac MacOS MacOS 5.1 Apr 21 1998}
==== modified version of stein_test ====
PRO stein_test, xSize, ySize
IF (N_Elements(xSize) EQ 0) THEN xSize = 512
IF (N_Elements(ySize) EQ 0) THEN ySize = 512
yOff = Fix(ySize / 2)
;Try this:
window,0, XSize=xSize, YSize=ySize
for i=0,500 do plots,[i,i,i],$
[yOff-1, yOff, yOff+1],/device,psym=3
;On my platform {alpha OSF unix 5.1 Apr 13 1998}, this does
;*not* draw all the pixels that should be filled. Instead,
;some pixel columns are left out, making the drawn "line"
;appear as a striped band (with variable stripe pattern). Is
;this the case for other platforms as well?
;I assume it's caused by some calculations w/round off error
;to/from normalized coordinates or such.
;It's quite weird, cause I get correct results for the
;following loop:
window,1, XSize=xSize, YSize=ySize
for i=0.0,500,1.0000001 do plots,[i,i,i],$
[yOff-1, yOff,yOff+1],/device,psym=3
;*and* for the following:
window,2, XSize=xSize, YSize=ySize
for i=0.0,500,.9999999 do plots,[i,i,i],$
[yOff-1, yOff, yOff+1],/device,psym=3
;But not for this:
window,3, XSize=xSize, YSize=ySize
for i=0.0,500,1.0 do plots,[i,i,i],$
[yOff-1, yOff, yOff+1],/device,psym=3
;(So it's not simply the *type* of the variable i that's causing this..)
end
--
Mike Schienle Interactive Visuals
mgs@ivsoftware.com http://www.ivsoftware.com
|