4 ms·
Pen plotters were fascinating to watch. I wish I knew what the motion optimization algorithms looked like. It would do stuff like draw the tail of an "R" but th
by vidanay 5y ago
Pen plotters were fascinating to watch. I wish I knew what the motion optimization algorithms looked like. It would do stuff like draw the tail of an "R" but then wouldn't come back and draw the remainder of the letter until two minutes later.
- joshu 5y agothe plotters themselves don’t have any, really. i do an optimization step before sending anything to the plotter.
- zabzonk 5y agoHP pen plotters were/are highly intelligent devices - for example you could tell them to draw a pie-chart, provide the data and the labels, and they would go off and do it. If they were not intelligent, and you had to plot all graphs by individual pen movements, no business would have used them. They also optimised things like pen changes and paper movement.
- rahimnathwani 5y agoDo you send the data and the labels to the plotter, or to the driver software running on your computer? I always imagined HP-GL would be a list of lines/curves, and that the plotter would plot them in whatever order they came in.
- zabzonk 5y agoI was using a CP/M computer - there was no driver architecture. You sent HP-GL instructions and data as text via the RS232 interface. The plotter obviously had a limited buffer size, which would prevent certain optimisations, but then so did the CP/M computer!
- rahimnathwani 5y agoSo interesting! In the most recent reference guide I found just now, it seems you can draw a segment of a pie chart using a single EW (Edge Wedge) instruction but, for a complete pie chart, this method would require you to calculate the angles of each segment yourself. And of course to add the labels yourself. Perhaps I'm looking in the wrong place or perhaps the instruction to draw a whole pie chart has been deprecated.
- zabzonk 5y agoYou may be right - this was a looong time ago. Calculating the angles from the data is not difficult though, so I may have forgot that I did it. I can't really imagine calculating and placing the labels myself though, but perhaps I was cleverer then! Anyway, the HP pen plotter we had in the early 1980s was a very impressive device, when what we had were Z80 based computers driving them.
- joshu 5y agoYou misremember. It doesn't do any of that.
- yjftsjthsd-h 5y ago> The plotter obviously had a limited buffer size, which would prevent certain optimisations, but then so did the CP/M computer! Yeah, but which had more? :) Reminds me of that time in the 90s(?) when people connected printers to computers, but the printers had more powerful processors than the computers. (Or later, when someone poked into the WiFi board on their arduino and realized that it was a more powerful microcontroller, but that's not so directly related)
- scruss 5y agoHP-GL was always able to plot text labels and make graph data markers: it was meant for scientific graphs, after all. Later plotters added arc sectors and filled (hatched) polygons. All the clever optimization was handled by the host computer: a plotter will just output what you tell it. There is a feature in HP-GL that does make certain types of XY plotting simpler. While it's not a programming language like PostScript, you can scale, rotate and offset the plot by arbitrary amounts. HP instrumentation manuals claimed it was possible to directly plot experimental data by feeding it straight to the plotter after setting the scale. I feel this was a highly aspirational statement, and one not seeing much real use.
- bitwize 5y agoA basic desktop plotter that spoke HP-GL couldn't do that. You couldn't tell it to just go plot a pie chart. It did have an arc primitive, but you had to specify the radius, color, start and end angles, and whether the arc was filled. You could build a basic pie chart out of several such arcs. There was also a label primitive, but only one font (variable sizes though). So if you had a fancy font you had to tell the plotter to draw it with simple line segments and arcs. That said, most professional graphics software knew how to break down their elaborate output into HP-GL primitives with an appropriate output driver for the plotter. So few users actually had to do this unless they were talking to the plotter directly through a BASIC program or something.
- jcrawfordor 5y agoOn some of the really common older plotter models, like the 74xx/75xx, these features were present but it's often desirable to not use them as the plotter linearizes curve segments much more slowly than the host computer can. So you'll get markedly faster plotting (and less inconsistent ink bleed) if you reduce everything to line segments on the host. This can be as much as a 90% improvement in plotting speed if you have the linearization set pretty high (which is default a startup). And at least on the 74xx, I have never experienced out-of-order execution of instructions, I'm skeptical that any plotters other than very recently implemented this as it would break assumptions made by a number of plotting packages if the plotter executed out of order. Many HPGL commands are highly stateful, considering how slow the on-board processor on these plotters was it'd probably make them net slower if they even tried to optimize. The buffer is also very small in 'compatibility mode' but modern packages should be fine with the 'extended' buffer size that can sometimes fit a whole document if it's not too complex.
- joshu 5y agoI have a 7575a. It will do some light reordering by pen number, nothing more. My Roland DXY-1150 which does "RD-GL" or whatever (but is functionally HPGL) does none at all.
- joshu 5y agoHP-GL has a few convenience functions for text and fills and so on. It doesn't do any reordering aside from grouping pen operations together (so it doesn't change back and forth) but only if it fits in the buffer.
- ddingus 5y agoAll of the ones I used had no optimization. They were basically CNC machines. Feed it the ops, and they do those ops with precision and speed and will repeat all of that a zillion times. Optimization was a front end process, if it was one at all.
- scruss 5y agoif you want to see how it's done in modern plotters/CNC, Bart Dring's [Grbl_ESP32](https://github.com/bdring/Grbl_Esp32 https://github.com/bdring/Grbl_Esp32) is fairly easy to follow with good docs. I have one of Bart's plotters, as I don't have space or money for an Axidraw with all my other old plotters around the place. For actual optimization of input files, [vpype](https://github.com/abey79/vpype)'s https://github.com/abey79/vpype)'s the one most people use. Going back to really old/simple plotters, there wasn't enough code space to do any optimization. For example, the (fairly terrible) Commodore 1520 roll paper plotter had 2KB of ROM for all the 6502-compatible code its micro-controller used. When I first looked into the [firmware](https://e4aws.silverdr.com/hacks/6500_1/ https://e4aws.silverdr.com/hacks/6500_1/), I was pretty shocked that it printed text by scanning a table of character data from the start every time. Then I realized that even storing pointers for each character would use up about ⅛ of total storage, and the mechanical plotter mechanism was always way behind anything the code could do. So small mattered more than efficient