PLOT3(5)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’– PLOT3 πŸ’–

okay so this is the plot3 page, section 5 of the BRL-CAD manual, and it's literally the entire tea on 3-D and color graphic plotting. bestie, grab a snack, we're decoding a binary plotting stream together πŸŽ€


✨ NAME ✨

plot3 β€” the 3-D and color graphic plotting interface, periodt πŸ’…


🌸 DESCRIPTION 🌸

So files in this format get produced by programs like pixhist3d-plot3(1), which use the routines described over in libplot3(3). Then they get interpreted for all sorts of devices by the standard programs from plot(1G), plus extra ones like plot3-fb(1). The way libplot3 output differs from libplot output is honestly just two things: it adds 3-D primitives, and it adds color. iconic behavior πŸ‘‘

A graphics file is basically a stream of plotting instructions. No cap. Each instruction is an ASCII letter, usually followed by some bytes of binary information, and the instructions get executed in order. A point is designated by four bytes that represent the x and y values β€” each value is a signed 16-bit integer, and those integers are written most significant byte first (iykyk). Three-dimensional data have an extra z value, which we just assume is zero for two-dimensional instructions. And the last designated point in an l, m, n, p, L, M, N, or P instruction? That becomes the "current point" for the next instruction. main character energy, honestly ✨

Each of the descriptions below starts with the name of the corresponding routine in libplot3(3), so you can match them up one-to-one 🫢

πŸŽ€ the classic 2-D (and friends) instructions

  • m β€” move: the next four bytes give a new current point.
  • n β€” cont: draw a line from the current point to the point given by the next four bytes. See plot(1G).
  • p β€” point: plot the point given by the next four bytes.
  • l β€” line: draw a line from the point given by the next four bytes to the point given by the following four bytes.
  • t β€” label: place the following ASCII string so that its first character falls on the current point. The string is terminated by a new-line.
  • a β€” arc: the first four bytes give the center, the next four give the starting point, and the last four give the end point of a circular arc. The least significant coordinate of the end point is used only to determine the quadrant. The arc is drawn counter-clockwise.
  • c β€” circle: the first four bytes give the center of the circle, the next two the radius. > heads up bestie: circles and arcs are not supported on all devices 😭
  • e β€” erase: start another frame of output.
  • f β€” linmod: take the following string, up to a new-line, as the style for drawing further lines. The styles are "dotted", "solid", "longdashed", "shortdashed", and "dotdashed". Effective only for the -T4014 and -Tver options of plot(1G) (TEKTRONIX 4014 terminal and Versatec plotter).
  • s β€” space: the next four bytes give the lower left corner of the plotting area; the following four give the upper right corner. The plot will be magnified or reduced to fit the device as closely as possible.

πŸ¦‹ the BRL additions πŸ¦‹

The following were added at BRL. Three-dimensional primitives have their z values ignored when displayed on two-dimensional devices β€” lowkey rude but okay πŸ’€

  • C β€” color: the next three bytes give respectively the intensities (0..255) of the three color components (additive colors red, green, and blue if a terminal; subtractive colors cyan, magenta, and yellow if hardcopy) to be used for subsequent plotting. The initial color is assumed to be (255,255,255), which is white on a terminal and black on hardcopy. Color specifications are ignored for black-and-white devices.
  • M β€” 3move: the next six bytes give a new current point.
  • N β€” 3cont: draw a line from the current point to the point given by the next six bytes. See plot(1G).
  • P β€” 3point: plot the point given by the next six bytes.
  • L β€” 3line: draw a line from the point given by the next six bytes to the point given by the following six bytes.
  • S β€” 3space: the next six bytes give the minimum corner of the plotting area; the following six give the maximum corner. The plot will be magnified or reduced to fit the device as closely as possible.
  • F β€” 3flush:

🌈 the double-precision girlies 🌈

  • x β€” double_point: the double-precision version of point.
  • v β€” double_line: the double-precision version of line.
  • o β€” double_move: the double-precision version of move.
  • q β€” double_cont: the double-precision version of cont.
  • w β€” double_space: the double-precision version of space.
  • i β€” double_circle: the double-precision version of circle.
  • r β€” double_arc: the double-precision version of arc.
  • W β€” double_3space: the double-precision, 3_D version of space.
  • X β€” double_3point: the double-precision, 3_D version of point.
  • O β€” double_3move: the double-precision, 3_D version of move.
  • Q β€” double_3cont: the double-precision, 3_D version of cont.
  • V β€” double_3line: the double-precision, 3_D version of line.

πŸ“ space settings that eat πŸ“

Space settings that exactly fill the plotting area with unity scaling appear below for devices supported by the filters of plot(1G). The upper limit is just outside the plotting area, except for the Megatek which displays the entire range of possible coordinates. In every case the plotting area is taken to be square; points outside may be displayable on devices whose face is not square.

  • DASI 300 β€” space(0, 0, 4096, 4096);
  • DASI 300s β€” space(0, 0, 4096, 4096);
  • DASI 450 β€” space(0, 0, 4096, 4096);
  • TEKTRONIX 4014 β€” space(0, 0, 3120, 3120);
  • Versatec plotter β€” space(0, 0, 2048, 2048);
  • Megatek display β€” space(-32768, -32768, 32767, 32767);

πŸ‘€ SEE ALSO πŸ‘€

libplot3(3), plot(n).

graph(1G), plot(1G) in the UNIX System User Reference Manual.


🧚 AUTHOR 🧚

Douglas A. Gwyn made the 3-D and color extensions to UNIX-plot. king behavior πŸ‘‘


This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.


πŸ™ˆ BUG REPORTS πŸ™ˆ

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β€” do not suffer in silence bestie, tell the devs fr fr πŸ’Œ


okay that's the whole page!! and just so we're cute and official about it: this was brought to you by BRL-CAD, PLOT3(5), and this whole vibe is dated to that BRL-CAD era of the manual πŸ’– slay, go plot something gorgeous ✨

πŸ“¦ where this page comes from