comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Object Rubberband Selection Box
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Object Rubberband Selection Box [message #19782] Wed, 26 April 2000 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Bill B. (wrb1000@my-deja.com) writes:

>> I really don't care for that technique because I don't think
>> it looks "professional" on many computers.
>
> Adobe and many other MSWIN app companies do not share this opinion.

Alas, it has been my burden all my life to hold strong opinions
that are not shared with others. It has made me a bad corporate
citizen and a pain in the ass to live with. But, on the other
hand, people sometimes call me a "colorful character". :-)

Cheers,

David

P.S. Let's just say I can't remember the last time I voted
for a winning politician. :-(

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Object Rubberband Selection Box [message #19784 is a reply to message #19782] Wed, 26 April 2000 00:00 Go to previous message
wrb1000 is currently offline  wrb1000
Messages: 9
Registered: January 1999
Junior Member
In article <MPG.1370a487f83b9267989af0@news.frii.com>,
davidf@dfanning.com (David Fanning) wrote:

>
> Uh, just to clarify, you will NOT find any SET_GRAPHICS_FUNCTON
> calls in any code I provide. :-)

That is true. The decision was made to include the
SET_GRAPHICS_FUNCTION because, depending on the content of the
underlying image, the bounding box might be difficult to
view. The color table is also being manipulated as part of an
image enhancement feature. An inverted bounding box gave the most
consistent visible results.

>
> I really don't care for that technique because I don't think
> it looks "professional" on many computers.

Adobe and many other MSWIN app companies do not share this opinion.

> I always use a DEVICE, COPY technique for drawing on graphics plots
> that use direct graphics.

Yes - it would be much more difficult to implement this application
without that.

>
> Just didn't want my reputation besmirched more than it has
> been lately. :-)
>

Of course :)


-Bill B.

--

"They don't think it be like it is, but it do."

Oscar Gamble, NY Yankees


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: Object Rubberband Selection Box [message #19788 is a reply to message #19782] Wed, 26 April 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Bill B. (wrb1000@my-deja.com) writes:

> By coincidence, I was just dealing with a problem with the rubberband
> code (courtesy of Dave Fanning) and thought I might ask the group a
> question. I recently received a PC upgrade at work with a fancy new
> Diamond Stealth III S540 AGP video card w/ 32 Mb. Upon trying my IDL
> application for the first time, to my horror, I managed to totally hang
> the entire machine upon invoking the rubberband box. Other wierdness
> was that the size of the box being drawn also affected how quickly it
> would hang. After much trial and error, I isolated the problem to one
> specific line:
>
> DEVICE, SET_GRAPHICS_FUNCTION = 10
>
> followed by the PLOTS command to draw the r-b box.

Uh, just to clarify, you will NOT find any SET_GRAPHICS_FUNCTON
calls in any code I provide. :-)

I really don't care for that technique because I don't think
it looks "professional" on many computers. I always use
a DEVICE, COPY technique for drawing on graphics plots
that use direct graphics.

Just didn't want my reputation besmirched more than it has
been lately. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Object Rubberband Selection Box [message #19789 is a reply to message #19782] Wed, 26 April 2000 00:00 Go to previous message
wrb1000 is currently offline  wrb1000
Messages: 9
Registered: January 1999
Junior Member
By coincidence, I was just dealing with a problem with the rubberband
code (courtesy of Dave Fanning) and thought I might ask the group a
question. I recently received a PC upgrade at work with a fancy new
Diamond Stealth III S540 AGP video card w/ 32 Mb. Upon trying my IDL
application for the first time, to my horror, I managed to totally hang
the entire machine upon invoking the rubberband box. Other wierdness
was that the size of the box being drawn also affected how quickly it
would hang. After much trial and error, I isolated the problem to one
specific line:

DEVICE, SET_GRAPHICS_FUNCTION = 10

followed by the PLOTS command to draw the r-b box. Using any other mode
(such as 8) made the problem go away. RSI, which by the way made great
effort to help, defined the problem as occuring in the video driver
(which *is* the most recent from the S3 website) and out of IDL's
jurisdiction.

I was just curious if anyone is using IDL with AGP video cards
specifically and if there have been any problems. I had been using a
clunky old 2M ISA card with no problems.

Thanks,

Bill B.

--
"They don't think it be like it is, but it do."

Oscar Gamble, NY Yankees


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: Object Rubberband Selection Box [message #19796 is a reply to message #19782] Tue, 25 April 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Pavel Romashkin (promashkin@cmdl.noaa.gov) writes:

> Let's just say this Mac (G4-400) is the first Mac I ever had that
> performs very nicely and faster than any PC I used (well, I don't have a
> real fast one :). Mmaybe the s-l-o-w rubberband is caused by a slow computer?

Apparently computer speed is not as important (mine is
certainly peppy enough normally) as fast buffer
access on the graphics card. I'm sure the Mac guys
had been thinking of that for a LONG time before
the PC guys got around to it. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Object Rubberband Selection Box [message #19797 is a reply to message #19796] Tue, 25 April 2000 00:00 Go to previous message
promashkin is currently offline  promashkin
Messages: 169
Registered: December 1999
Senior Member
Hi David,
Not questioning your judgement, I tried the rubberband code I have not
used since I got new computer that has OpenGL supporting ATI-128 card,
w/16 Mb of video ram. I must admit that either rendering method is very
fast, so much so that I can barely make my rubberband "lag" behind the
cursor if I move it across the screen as fast as I can. Also, hardware
rendering appears to be a tad faster in my case. I, no doubt, have a
plainer code than David, so bells and whistles that he has might change
the picture.
Let's just say this Mac (G4-400) is the first Mac I ever had that
performs very nicely and faster than any PC I used (well, I don't have a
real fast one :). Mmaybe the s-l-o-w rubberband is caused by a slow computer?
Cheers,
Pavel

David Fanning wrote:
>
> Hi Folks,
>
> The other day someone complained to me in an e-mail that
> their rubberband selection box in an object graphics program was
> v-e-r-y slow to render. Did I have any ideas?
>
> Since I vaguely remembered doing this before, a long time
> ago, and since I didn't recall any particular problems with
> it, I decided to look into it. I modified my direct graphics
> ZIMAGE program to use object graphics rather than direct
> graphics. Guess what? It was p-a-i-n-f-u-l-l-y slow to
> render!
>
> Humm. What is going on here!? I was instancing my scene.
> I was using a Polyline object for the box. Surely all of
> that was right...
>
> After futzing around for an hour or so I decided to
> check my rendering setting. Hardware acceleration.
> Oh, oh. That should work. Let's try software rendering
> just for laughs. Yikes! Rendering was well over 2 orders
> of magnitude FASTER! In fact, the damn thing worked now.
>
> I checked with the folks at RSI (luckily) before I chucked
> my graphics accelerator card out the window, and they tell
> me that IDL's software renderer has been optimized for
> object instancing. I'm still dubious, but the results
> are irrefutable in this instance. :-)
>
> Anyhow, I thought that was worth knowing and it made me
> feel like I had gotten *something* done today, anyway.
>
> You can find the program I wrote here, if you are interested:
>
> http://www.dfanning.com/programs/zoombox.pro
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
Re: Object Rubberband Selection Box [message #19803 is a reply to message #19796] Mon, 24 April 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Just a follow-up to my own post. I wrote:

> I checked with the folks at RSI (luckily) before I chucked
> my graphics accelerator card out the window, and they tell
> me that IDL's software renderer has been optimized for
> object instancing. I'm still dubious, but the results
> are irrefutable in this instance. :-)

I'm no longer dubious. I'm a believer. :-)

I've heard now from someone who I am certain knows
what is going on and he reports that the software
renderer has been "HEAVILY" optimized (his words)
for instancing.

Moreover, he reports that software rendering has
a very high percentage chance of being faster than
hardware rendering for both images and volumes,
which some graphics cards have problems with. And
this, too, squares with my personal experience.

I have a new rule of thumb (actually, it's an old
rule of thumb that I somehow forgot): if it doesn't
work right and you think it should, try the software
renderer. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: linking programs/ procedures
Next Topic: Re: Polygons and polylines

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 07:54:37 PDT 2025

Total time taken to generate the page: 0.87876 seconds