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

Home » Public Forums » archive » Re: Object-Graphics: How to compute screen XY from model XY
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-Graphics: How to compute screen XY from model XY [message #75808] Sun, 01 May 2011 11:27
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
M. Katz writes:

>
> In an object-graphic draw window, I'm trying to figure out the on-
> screen pixel location of a given coordinate in the (rotated, scaled,
> and translated) model.
>
> Working with IDLgrWindow, it's easy to do the reverse. That is, when
> you know a cursor position, [event.x, event.y], you can calculate the
> position within the graphics model using
> result = oWindow -> PickData(oView, oModel, [event.x,event.y], XYZ)
> After this command, it's contained in XYZ.
>
> But what about the other way? Say we have an XYZ value and we want to
> calculate the effective cursor position, cursor_xy, or screen
> coordinate. This would be the equivalent of an [event.x, event.y].
>
> It seems that there should be a function for this. I'm pretty sure I
> can deduce the position from a few sampled points and some vector
> math, but should I have to?

I'm 99% certain you will have to write this function yourself.
Whether you "should have to" or not, is really way above my
pay grade. Have you been making the proper animal sacrifices? :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Object-Graphics: How to compute screen XY from model XY
Next Topic: something (wrong?) with CONGRID?

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

Current Time: Wed Oct 08 19:05:29 PDT 2025

Total time taken to generate the page: 0.00579 seconds