Re: Annoyances...how about this one? [message #12806] |
Wed, 09 September 1998 00:00 |
mgs
Messages: 144 Registered: March 1995
|
Senior Member |
|
|
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
|
|
|
Re: Annoyances...how about this one? [message #12807 is a reply to message #12806] |
Wed, 09 September 1998 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
rmlongfield@my-dejanews.com wrote:
>
> Hi All,
> I put Stein's examples in an idl procedure producing 4 windows and run it on:
Hi all,
here's my version
IDL> print,!version
{ mipseb IRIX unix 5.1.1 Jul 20 1998}
I ran stein_test and found dashed lines only in window 2 !
Martin.
[ program cut]
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
|
|
|
Re: Annoyances...how about this one? [message #12809 is a reply to message #12806] |
Wed, 09 September 1998 00:00  |
rmlongfield
Messages: 68 Registered: August 1998
|
Member |
|
|
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?
Rose
-----------program------------------------------------------ -------------------
PRO stein_test
;Try this:
window,0
for i=0,500 do plots,[i,i,i],[300,301,302],/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
for i=0.0,500,1.0000001 do plots,[i,i,i],[300,301,302],/device,psym=3
;*and* for the following:
window,2
for i=0.0,500,.9999999 do plots,[i,i,i],[300,301,302],/device,psym=3
;But not for this:
window,3
for i=0.0,500,1.0 do plots,[i,i,i],[300,301,302],/device,psym=3
;(So it's not simply the *type* of the variable i that's causing this..)
end
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
|
|
|
Re: Annoyances...how about this one? [message #12822 is a reply to message #12806] |
Tue, 08 September 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Stein Vidar Hagfors Haugan (steinhh@ulrik.uio.no) writes:
> Try this:
>
> window
> for i=0,500 do plots,[i,i,i],[300,301,302],/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?
> Doesn't quite make sense, does it?
No. But all your examples are reproducible on my Windows NT machine. :-)
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|