View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Sat Mar 06, 2021 1:34 pm Post subject: |
|
|
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 |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1899
|
Posted: Mon Mar 15, 2021 7:57 am Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Mar 16, 2021 9:04 pm Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Mar 18, 2021 8:07 am Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Mar 18, 2021 2:18 pm Post subject: |
|
|
Maybe there should be but at the moment there isn't. |
|
Back to top |
|
 |
|