x-y-graphic

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

x-y-graphic

Post by didi »

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

Code: Select all

****  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 ?
Last edited by didi on Sun Jul 22, 2007 5:15 pm, edited 3 times in total.

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

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

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

If you have a flickr account, you could link to images there. Or use www.shareavenue.com or something similar.

Or how about posting your code on the newLISP wiki?

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

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

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?p ... e_Snippets


The code seems to be complete .

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

Code: Select all


( 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
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

A first picture :

http://img4.shareavenue.com/image.php?f ... 74efb504e9

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

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

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

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

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
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

didi wrote: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
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

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?p ... d_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
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

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

Locked