HOME

TheInfoList



OR:

HP-GL, short for Hewlett-Packard Graphics Language and often written as HPGL, is a
printer control language In digital printing, a page description language (PDL) is a computer language that describes the appearance of a printed page in a higher level than an actual output bitmap (or generally raster graphics). An overlapping term is printer control l ...
created by
Hewlett-Packard The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational information technology company headquartered in Palo Alto, California. HP developed and provided a wide variety of hardware components ...
(HP). HP-GL was the primary printer control language used by HP
plotter A plotter is a machine that produces vector graphics drawings. Plotters draw lines on paper using a pen, or in some applications, use a knife to cut a material like vinyl or leather. In the latter case, they are sometimes known as a cutting ...
s. It was introduced with the plotte
HP-8972
in 1977 and became a standard for almost all plotters. Hewlett-Packard's printers also usually support HP-GL/2 in addition to PCL.


Design

The language is formed from a series of two letter codes (
mnemonic A mnemonic ( ) device, or memory device, is any learning technique that aids information retention or retrieval (remembering) in the human memory for better understanding. Mnemonics make use of elaborative encoding, retrieval cues, and image ...
s), followed by optional parameters. For instance an arc can be drawn on a page by sending the string: AA100,100,50; This means ''Arc Absolute'', and the parameters place the center of the arc at absolute
coordinates In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine the position of the points or other geometric elements on a manifold such as Euclidean space. The order of the coordinates is sig ...
100,100 on the page, with a starting angle of 50 degrees measured counter-clockwise. A fourth optional parameter (not used here) specifies how far the arc continues, and defaults to 5 degrees. When first introduced, HP-GL contained the following commands: Formats: * integer formats between -32767 and 32768. No decimal point. * decimal format between +/- 127.9999. Optional decimal point. * ASCII character


Examples

Typical HP-GL files start with a few setup commands, followed by a long string of graphics commands. The file was in
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
(
text file A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operat ...
)
format Format may refer to: Printing and visual media * Text formatting, the typesetting of text elements * Paper formats, or paper size standards * Newspaper format, the size of the paper page Computing * File format, particular way that informatio ...
, for instance: The coordinate system was based on the smallest units one of the HP plotters could support, and was set to 25 µm (i.e. 40 units per millimeter, 1016 per inch). The coordinate space was positive or negative
floating point In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can ...
numbers, specifically ±230.


HP-GL/2

The original HP-GL language did not support definition of line width, as this parameter was determined by the pens loaded into the plotter. With the advent of the first
inkjet Inkjet printing is a type of computer printing that recreates a digital image by propelling droplets of ink onto paper and plastic substrates. Inkjet printers were the most commonly used type of printer in 2008, and range from small inexpens ...
plotters, line width for the "pens" specified within the HP-GL files had to be set at the printer so it would know what line width to print for each pen, a cumbersome and error-prone process. With Hewlett-Packard Graphics Language/2 aka HP-GL/2, definition of line width was introduced into the language and allowed for elimination of this step. Also, among other improvements a
binary file A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document fil ...
format was defined that allowed for smaller files and shorter file transfer times, and the minimal resolution was reduced.


AGL

HP-GL is related to AGL (A Graphics Language), an extension of the
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
programming language. AGL was implemented on Hewlett-Packard
minicomputer A minicomputer, or colloquially mini, is a class of smaller general purpose computers that developed in the mid-1960s and sold at a much lower price than mainframe and mid-size computers from IBM and its direct competitors. In a 1970 survey, ' ...
s to simplify controlling a plotter. AGL commands describe the desired graphics plotting function, which the computer relays as several HP-GL instructions to the plotter.


See also

* DMPL, another plotter language by Houston Instruments * Gerber format is another plot-description format *
ShareCAD ShareCAD or ShareCAD.org is a free online service aimed at viewing different DWG and CAD formats as well as 3D models in a web browser. The service doesn't require any installation or registration and enables users to view vector, raster, ...
, a free online HP-GL/PLT viewer *
Logo A logo (abbreviation of logotype; ) is a graphic mark, emblem, or symbol used to aid and promote public identification and recognition. It may be of an abstract or figurative design or include the text of the name it represents as in a wo ...
, a computer language with drawing commands similar to HP-GL


References


Further reading

*


External links

* * * (NB. A Python-based HP-GL plotter control library for using vintage pen plotters with contemporary operating systems.) {{Authority control HP software Vector graphics Page description languages