forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting Co-ords by Clicking On (or near to ?) a Point

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sat Mar 06, 2021 12:14 pm    Post subject: Getting Co-ords by Clicking On (or near to ?) a Point Reply with quote

I have need of a clarification please.

Using GET_PLOT_DATA@ , am I right in assuming that the co-ordinates are those of the actual pixel clicked on and NOT the actual inut co-ordinates of the nearest 'plot point' ?

If so, it would be very useful to have a command which could recover the ACTUAL real point co-ordinates of the plotted graph point nearest to the cursor.
If you see what I mean.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Mar 06, 2021 1:34 pm    Post subject: Reply with quote

GET_PLOT_DATA@ takes INTEGER (ix,iy) co-ordinates for a point on the screen (supplied as input values in the program) and transforms them to the corresponding double precision values for the point on the graph.

The integer values are used directly without any processing.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Fri Mar 12, 2021 10:24 pm    Post subject: Reply with quote

So, assuming my understanding is correct, for any input value 'x' the nearest pixel whivh corresponds to that value is used. Going in the opposite direction (pixel to vlue) some accuracy is then lost ?
There's also the question as to whether or not one has clicked on the precise pixel to which the value was attributed.
So, how can one be sure the right value has been selected ?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sun Mar 14, 2021 10:51 pm    Post subject: Reply with quote

Paul, to remove the flumoxing way I expressed my question in my last post, I guess what I typed in my last comment above is best expressed as:

'we need a way (a function) built into ftn95 which will identify the NEAREST ACTUAL point plotted on the graph (relative to the clicked position) and recover it's precise value (I guess from the input file).'

Otherwise we'll never get the right value from selection via the existing function, because the chances of clicking on the exact pixel are small, and anyway the exact value of the point plotted point are rounded anyway!
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Mon Mar 15, 2021 7:57 am    Post subject: Reply with quote

John S., I think that it would be the application programmer's responsibility to write code to recover the (two, three or higher dimensional) input data that is represented on a 2-D screen plot when the user clicks on a "point". I don't think that a library routine can accomplish this task, since it is so dependent on the reversibility of the space-to-plane transformation.

An example of why this has to be so:
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Tue Mar 16, 2021 8:00 pm    Post subject: Reply with quote

I disagree.
Posting an escher-esque example prooves nothing, especially when the example is 'impossible'.

In any case , my comment is about 2-D X-Y plots ! NOT an escheresque construction.

It should be a simple task to select the appropriate point from the input data based on proximity of the clicked point.

Of course, the user(s) could do this themselves, but its like re-inventing the wheel an infinite number of times, and no doubt sometimes the wheel would turn out square !!!

If you see what I mean.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Tue Mar 16, 2021 8:02 pm    Post subject: Reply with quote

the whole point is that the existing function DOES NOT give the actual co-ordinates of the plotted point, and it keeps on being suggested as though it does !
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Mar 16, 2021 9:04 pm    Post subject: Reply with quote

The native %pl uses real value arithmetic and passes real valued results to the Microsoft GDI+ which is designed to work with real values.

Integer values supplied by the programmer are fed directly into this real arithmetic and there is no choice but to use them without adjustment. Granted the values may be picked off a pixelated screen but if the programmer can't make any adjustment because the image is two-dimensional then no adjustment is logically possible within ClearWin+.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Wed Mar 17, 2021 10:34 pm    Post subject: Reply with quote

?????
I'm now even more confused than I was previously !
our explanation flumoxed me Paul, I'm sure it's just a question of understanding what you wrote.

Let me (try to)clarify what i'm asking here:

Let's take a (hypothetical) example

Let's assume that a 'value' has actual x/y co-ordinates of 32.546789, 17.3456789 (I picked these numbers at absolute random !)

Assume now that the nearest pixel (the one chosen by the program to put as the point on the graph) corresponds to the centre coordinates: 32.55, 17.36

When that pixel is chosen (clicked on) presumeably the coordinates 32.55, 17.35 are selected, right ?

In which case the coordinates fed back are incorrect ?

In addition, imagine that the exact point isn't clicked on - in that case there is further error.

So, what I'm saying is: 'is it possible to (internally to ftn95) pick out the ACTUAL precise coordinates of the nearest plotted point by searching for the nearest plotted point actual coordinates (in the input file) and output those coordinates ?'

Or am I misunderstanding what the program does here ?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Mar 18, 2021 8:07 am    Post subject: Reply with quote

GET_PLOT_DATA@ and GET_PLOT_POINT@ provide co-ordinate transformation to/from graph/screen co-ordinates.

Internally %pl has floating point (fp) co-ordinates (xmin, ymin), (xmax,ymax) and (x0,y0) for the origin, that are determined either directly from user parameters or indirectly from the user's plot data.

Integer values input to GET_PLOT_DATA@ are used in a fp calculation without ambiguity or loss of precision.

There is no provision within ClearWin+ that relates a given pixel point to a user's line/curve on the graph.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Mar 18, 2021 1:51 pm    Post subject: Reply with quote

That's all well and good but ...
To repeat my questions ...

Quote:
When that pixel is chosen (clicked on) presumeably the coordinates 32.55, 17.35 are selected, right ?

In which case the coordinates fed back are incorrect ?

In addition, imagine that the exact point isn't clicked on - in that case there is further error ?

So, what I'm saying is: 'is it possible to (internally to ftn95) pick out the ACTUAL precise coordinates of the nearest plotted point by searching for the nearest plotted point actual coordinates (in the input file) and output those coordinates ?'


and going back to my very first question in my very first comment at the top of this post ...
Quote:
Using GET_PLOT_DATA@ , am I right in assuming that the co-ordinates are those of the actual pixel clicked on and NOT the actual inut co-ordinates of the nearest 'plot point' ?

_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "


Last edited by John-Silver on Thu Mar 18, 2021 2:04 pm; edited 3 times in total
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Mar 18, 2021 1:57 pm    Post subject: Reply with quote

as for :
Quote:
There is no provision within ClearWin+ that relates a given pixel point to a user's line/curve on the graph.


... maybe not, but there should be the capability of clicking near to a data point and it bringing up the ACTUAL plotted data value as in the input file of the nearest point.
... as I believe is done in Excel for example when clicking near a plotted data point.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Mar 18, 2021 2:18 pm    Post subject: Reply with quote

Maybe there should be but at the moment there isn't.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Mar 29, 2021 9:27 pm    Post subject: Reply with quote

i would be a very useful addition, some would say essentil, since as I see it at the moment clicking on anything might not give you the actual value on needs/expects.
If my understanding is correct, clicking near a point doesn't give the exact/precise value on eis looking for/expecting.

This is not an error, it's something for future development which should be prioritised I'd have thought.

As this discussion has proven, things need to be preciselt defined as to what they do, or misunderstandings can occur .... which leads to errors in results
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group