x-y-graphic

Started by didi, July 22, 2007, 09:58:46 AM

Previous topic - Next topic

didi

As a first step,  the axes drawing and autoscaling are already working :


****  sorry  cut & paste doesn't work correctly ****

This works :

- autoscaling to user-units

- automatic adaption of the frame and text-size to the screen-resolution

- draws only the used  quadrants of the graph

- coordinate-transformation



The next tasks are - the user-interface to interact with the x-y-graph - formula input -  x-range-input -  start-calculation and so on .

The target-application  for me is a x-y-graph with multiple  y-axes ,  to do some iterative simulations for  dc-motor-drives  or similar things.  



Ok - it's still a long way to version 1.000  ,  but i promised  Lutz that i'll show what i'm working on .



PS : the code doesn't fit exactly in the forum-width , i hope it works anyway -  how can i store  pictures and text-files into this forum ?

didi

#1
Sorry -  the code seem to be to big for the forum .  I have to delete it.

cormullion

#2
If you have a flickr account, you could link to images there. Or use http://www.shareavenue.com">www.shareavenue.com or something similar.



Or how about posting your code on the newLISP wiki?



http://alh.net/newlisp/wiki/">//http://alh.net/newlisp/wiki/

didi

#3
Many thanks Cormullion ,  i copied the code to this - i don't know if you meant it this way .



http://alh.net/newlisp/wiki/index.cgi?page=Guiserver_user_contributed_Code_Snippets">http://alh.net/newlisp/wiki/index.cgi?p ... e_Snippets">http://alh.net/newlisp/wiki/index.cgi?page=Guiserver_user_contributed_Code_Snippets





The code seems to be complete .

didi

#4


( define ( xrel-to-screen rel )  ( / (* rel ( gs:screen 0 ))  100 ))  
( define ( yrel-to-screen rel )  ( / (* rel (gs:screen 1  ))  100 ))


( define ( xrel-to-screen rel ) ( / (• rel ( gs:screen 0 )) 100 ))
( define ( yrel-to-screen rel ) ( / (• rel (gs:screen 1 )) 100 ))


Sorry - the wiki  translated  two times the *  on two places into  circles , see  code above .



If i change the circles into  *  the program-snippet works correct.

didi

#5
A first picture :



http://img4.shareavenue.com/image.php?file=f073869d7f9395067e398b6b87162b74efb504e9">//http://img4.shareavenue.com/image.php?file=f073869d7f9395067e398b6b87162b74efb504e9



hope i didn't  wreck your nerves - thanks cormullion for the shareavenue-tip!

cormullion

#6
worked OK first time for me! Looks like it will be useful code too.

didi

#7
Somehow the code disappeared out of the wiki - i think someone deleted it.

I give up , i'll programm the next task and hopefully be  soon back with the complete application .

cormullion

#8
Quote from: "didi"Somehow the code disappeared out of the wiki - i think someone deleted it.


It was there when I looked yesterday - perhaps I deleted it accidentally by looking at it? (Schrödinger's Wiki...?) :-) Hope not - sorry if I did.

Lutz

#9
somebody deleted it because the page was not password protected. I restored it clicking on the link, then typing 'restore' where it says 'page'. Then I protected it with the usual password, Ryon gave us, see here:



http://alh.net/newlisp/wiki/index.cgi?page=How_To_Use_Advanced_Features">http://alh.net/newlisp/wiki/index.cgi?p ... d_Features">http://alh.net/newlisp/wiki/index.cgi?page=How_To_Use_Advanced_Features



Lutz



ps: when putting code into the wiki, every line should be preceded by a space, so characters and indentation are not changed.

didi

#10
Thanks Lutz  .  

Now copy & paste from the wiki  into the newLISP-edit works, too.