DDISP(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸ’– DDISP(1) β€” plot a stream of doubles on a framebuffer πŸ’–

okay bestie, so this is a page from the BRL-CAD manual, and it's genuinely one of the cutest little tools in the whole toolbox. it's called ddisp and it takes a firehose of numbers and turns it into pixels on a screen. no cap, that's it. that's the whole vibe. πŸ¦‹


✨ NAME ✨

ddisp β€” plot a stream of doubles on a framebuffer


🌸 SYNOPSIS 🌸

ddisp [-v] [-b] [-p] [-c] [-H] < input.doubles

πŸŽ€ DESCRIPTION πŸŽ€

so here's the tea, bestie: ddisp reads a continuous stream of host double-precision floating-point numbers from standard input and plots them onto a 512x512 BRL-CAD framebuffer. literally just numbers in, pixels out. iconic behavior. πŸ‘‘

the data gets processed in records of BU_PAGE_SIZE values at a time, and each record is clamped to the 512-pixel framebuffer width. (so if you're out here trying to sneak extra values into a record, the framebuffer said "no ma'am." πŸ’…)

in the default mode, each record is drawn as one horizontal grayscale line. every value gets scaled β€” magnitude 0.0 to 1.0 mapped to intensity 0-255 β€” and written as a pixel. successive records march down the screen, and when they hit the bottom they wrap right back to the top. it's giving scrolling. it's giving spectrogram energy. 🌈

the -v and -b options instead plot each record as a green waveform centered vertically, where a value of +/- 1.0 maps to +/- 128 pixels from the center row. so like, center row is home base and your values are the little gremlins running up and down from it. 🧚

ngl, the input is typically produced by signal-processing tools such as dmod(1), dfft(1), or dconv(1). and if standard input is a terminal, ddisp prints its usage and exits β€” so it will NOT sit there awkwardly waiting for you to type numbers at it. it knows better. 😭

πŸ’… OPTIONS πŸ’…

  • -v β€” Vertical (point) plot mode. each value is plotted as a single green pixel, and how high above or below the center row that pixel lands is proportional to its value. this option also disables pausing and clearing. so like, no pausing, no clearing, just vibes and points. ✨
  • -b β€” Bar graph mode. it's like -v but make it solid β€” draws a solid green vertical bar from the center row out to each value, clamped to the +/- 128 pixel range. thicc data. πŸ“Š
  • -p β€” Pause for 3 seconds after drawing each record. useful for animating successive records frame by frame, i.e. if you want to actually watch your data do its thing instead of it being over in a blink. 🎬
  • -c β€” Clear the framebuffer before drawing each record. most useful with -v or -b to produce a clean animation of each frame. no ghosting, no leftovers, fresh canvas every time. 🫧
  • -H β€” Print the usage message and exit. and bestie, the -h and -? flags behave the same way. three whole ways to say "help me please." 🫢

πŸ¦‹ EXAMPLES πŸ¦‹

Example 1. Animate a waveform as a bar graph

dmod -s2.0 < signal.d | ddisp -b -c -p

scales a stream of doubles with dmod(1), then feeds the result to ddisp, which clears the framebuffer and draws each record as a green bar graph, pausing three seconds between frames to animate the signal. it's a whole little pipeline and it absolutely ate. πŸ”₯

Example 2. Display a scrolling intensity map

ddisp < spectrogram.d

reads records of doubles from spectrogram.d and draws each record as a horizontal grayscale line, scrolling down the framebuffer to build up a spectrogram-style display. no flags, no fuss, just scrolling grayscale excellence. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

brlcad(1), dmod(1), dfft(1), dconv(1), fbserv(1)


🌸 AUTHOR 🌸

BRL-CAD Team β€” the real ones. πŸ’œ


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. if something's busted, tell the devs β€” don't suffer in silence, bestie. πŸ˜­πŸ’–


and that's the whole page! brought to you by BRL-CAD, page DDISP(1) β€” mwah, take care of yourself, and go plot something pretty. πŸ’…βœ¨

πŸ“¦ where this page comes from