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

Home » Public Forums » archive » Re: CURSOR skips a few beats :-(
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CURSOR skips a few beats :-( [message #69628 is a reply to message #69626] Thu, 28 January 2010 15:35 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gianguido Cianci writes:

> Right, you can join the dots... so when IDL plots the line between the
> dots, it calculates which pixels need to turn white. How do I get the
> coords of all those pixels?

I'm not trying to be a smart-aleck here, but why do you
want them? (I'm trying to figure out the best way to
answer your question. Maybe the best way is to avoid
the headache of getting things you don't need!) Anyway,
what are you going to do with them when you get them?

> I have come up with a three-step linear interpolation that I do
> between each pair of points and it seems to be working (with 2 probs).
> here is a snippet:

Uh, have you given any thought to writing a widget program? :-)

> Problem #1: it is not very pretty, but I could live with that I
> suppose. Though I feel there must be a better way.

I think so, too, but I can't tell yet what it is.

> Problem #2: when you (slowly!) move the mouse out of the left edge of
> the window the program crashes because x1= 0>x1<f_xsize-1 sets x1 to
> -1!!! And I can't figure that one out :-(

Well, this is one of the most common gotchas in IDL! You
need parentheses.

x1 = 0 > x1 < (f_xsize-1)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Mode and variation of cells in multiple grids (3-D problem)
Next Topic: read an mp3?

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

Current Time: Sat Oct 11 02:31:17 PDT 2025

Total time taken to generate the page: 0.23981 seconds