Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macsyma on-screen plots #1129

Closed
larsbrinkhoff opened this issue Aug 2, 2018 · 24 comments
Closed

Macsyma on-screen plots #1129

larsbrinkhoff opened this issue Aug 2, 2018 · 24 comments

Comments

@larsbrinkhoff
Copy link
Member

Here's a GUI for Maxima (done by @lokedhs) showing some plots:
https://www.youtube.com/watch?v=9VIT_Ml2v-Q

I don't think something like this would be outside the reach of ITS Macsyma. Similar to how compile_lisp_file can call out to another program, the Macsyma PLOT... is it 2 or 3? ... package can call on a program that draws a plot on the screen.

@eswenson1
Copy link
Member

eswenson1 commented Aug 6, 2018

Not quite the same, but you can use PLOT(sin(x),x,0,%pi*2); now within Macsyma. You will get a plot displayed on your screen. Not particularly good graphics (text graphics), but it works. It uses the graphing support in MAXOUT; GRAPH FASL and MAXOUT; GRAPH2 FASL. Both of these come from JPG; PLOT >. (I've never seen the use of (DECLARE (SPLITFILE ...)) to cause the lisp compiler to emit more than one FASL file from the same source file.

@TheFausap
Copy link
Contributor

I'm trying to use PLOT2 to print in a file, but at the moment I am able only to have a on-screen plot.
I'm doing in this way:

plotmode(xgp,d);
plot2(sin(x),x,-1,1);

If I remove the D in the PLOTMODE command, I have two identical files in .TEMP. (FAUSAP .PLOT. and .PLOT. 1 - after I run in MACSYMA the command HARDCOPY()) but i do not know how to process them. I tried with VERSA with no luck.

I also noticed that PLOTMODE accept, also, as parameter the GR (GRINNEL TV). What is this ?

@larsbrinkhoff
Copy link
Member Author

larsbrinkhoff commented Aug 14, 2018

The Grinnell TV is a bitmapped terminal system similar to the Knight TV, but built on MINITS. See #145.

@larsbrinkhoff
Copy link
Member Author

There is now a simpler way to get plots out on the XGP (and they look
better).  Simply do PLOTMODE(XGP, ...) where ... is the correct plot
mode for your terminal (i.e. GR for Grinnell TV's, T for Tektronix, or
D for character display terminals like VT52's).  Then you can use
linefeed at the end of the display of a plot, or HARDCOPY(); to cause
a hardcopy to be submitted  to the XGP (it is processed by the Gould
spooler first).  If AI is up and the queuing for the XGP is successful,
you will receive a message from the XGP spooler when your plot is
printed.  If AI is down, your plot will be processed into an XGP scan
file,  .GLPT.; > SCN, and the Gould spooler will send you a warning
message telling you that AI is down.  You must copy the SCN file to AI
yourself when AI comes up and queue it by doing
        :XGP ;SCAN AI:dir;* SCN
where dir is the directory on AI to which you copied the files (use
MACSYM;  if you don't know of any other directory to use).

If you use the NAMEFILE command instead of HARDCOPY or linefeed,
you can print the plot file later by doing
        :GTPL dir;fn1 fn2/a/o[x]
when dir, fn1, fn2 are the directory, first file name, and second file
name of the plot file stored with NAMEFILE.

XGPSAVE may be flushed in the future if there is no further demand for
it.

@larsbrinkhoff
Copy link
Member Author

It seems PLOT2 can draw on an Imlac or Grinnell TV using ARDS graphics commands. In that case, I suppose it shouldn't be too hard to add SUPDUP graphics for the Knight TV.

@lokedhs
Copy link
Contributor

lokedhs commented Aug 14, 2018 via email

@larsbrinkhoff
Copy link
Member Author

John Kulp says Macsyma could use a graphics package by Charles Karney (CFFK) to display on the MINITS TV systems. This was for Symbolics Common Lisp though.

@larsbrinkhoff
Copy link
Member Author

I see these interesting files:

CFFK; APLOT2 300
CFFK; ARDS 44
CFFK; FTV 113
CFFK; 3DPLOT 66
CFFK; TEKPLT 171

@larsbrinkhoff
Copy link
Member Author

PLOT2 drawing on the Tektronix emulator in xterm.

macsyma

@eswenson1
Copy link
Member

How did you get this to work? I started up xterm, did a "TERM=tek" and then telneted to an ITS, did a :tctyp tek, ran macsyma, and tried a plot. The results were bad.

Did you start up xterm differently? Did you specify a TCTYP before starting Macsyma? Did you need to tell Macsyma anything before invoking PLOT2?

@eswenson1
Copy link
Member

Never mind. Figured it out. Had to start xterm with -t option. Then, telnet to ITS, do ":tctyp tek", then run macsyma, and plot.

@larsbrinkhoff
Copy link
Member Author

larsbrinkhoff commented Mar 18, 2019 via email

@eswenson1
Copy link
Member

Did you figure out how to display nice graphics on a TV11? I haven't yet.

@larsbrinkhoff
Copy link
Member Author

larsbrinkhoff commented Mar 18, 2019 via email

@eswenson1
Copy link
Member

Some documentation I found says this:

    The devices supported are:  The Tektronix 4010, 4013, 4025 and
4662, the Imlac PDS 1 and PDS 4 (using ARDS graphics conventions),
the XGP, the Gould line-printer (in MIT building 38-246), the Dover, some
Versatecs on the MFE-NET and, in a "preview" mode, printing and display
consoles.

@larsbrinkhoff
Copy link
Member Author

There's also this, but "soon" hasn't happened yet. 5 is the TCTYP code for a TV terminal.

        5       DISPLAY         (TV these may soon be supported)

@eswenson1
Copy link
Member

In theory, although I haven't gotten it to work yet, after a plot is displayed, you can type and the HARDCOPY command will be executed on the current plot. This is supposed to write an ARDS file to the .TEMP.; directory. This would have typically been used with the XGP command to output the graph to the XGP printer. But the intermediate form is ARDS, so theoretically anything that can display ARDS format should be able to display these.

@eswenson1
Copy link
Member

eswenson1 commented Mar 18, 2019

I lied. It works fine. You have to first do:

PLOTMODE(XGP);

Then, your plot will be saved to .TEMP.;<UNAME> .PLOT..

Then you can display on a TV with:

:SUPARD .temp.;ejs .plot.

@larsbrinkhoff
Copy link
Member Author

Yes, the resulting file can be displayed on a TV with SUPARD.
macsym-tv

@eswenson1
Copy link
Member

Yes. It is annoying that it uses the same file name each time. It might have been nice if the demo script I gave you could emit each plot to the screen and also to a file.

But if you can demo with a Tektronix xterm then you’ll see nice graphs anyway. If you want ARDS graphics, I could alter the script to emit each to a file, use macsyma commands to rename the file, and carry on. Then you could use SUPARD to display each on a TV.

Let me know if you want me to do any more for your Macsyma demo.

@larsbrinkhoff
Copy link
Member Author

I'm good, thanks!

I think it's better to run xterm and get the graphics drawn live. It also highlights how archaic Tektronix emulation in xterm can be of use with historical programs.

@eswenson1
Copy link
Member

Agreed.

@larsbrinkhoff
Copy link
Member Author

larsbrinkhoff commented Mar 19, 2019

To add support for Knight TV displays:

  • Invent a new plotmode, say TV. Update documentation.
  • Add to the TEKPLT cond at line 1172: ((= tty 5.) (i-$plotmode '($tv)))
  • Add to I-$PLOTMODE something that sets tv-mode.
  • Implement tv-point, tv-line, tv-clear, tv-char-print, maybe using SUPDUP graphics.
  • Maybe use DCP; SGINCL for SUPDUP grapics.

@larsbrinkhoff
Copy link
Member Author

A more elaborate Tektronix 4010 emulator by @rricharz is being added: #1835.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants