Skip to documentation
DocumentationAll documentsEnglish

DDISP(1)

NAME

ddisp - plot a stream of doubles on a framebuffer

On this page

SYNOPSIS

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

DESCRIPTION

ddisp reads a continuous stream of host double-precision floating-point numbers from standard input and plots them onto a 512x512 BRL-CAD framebuffer. The data is processed in records of BU_PAGE_SIZE values at a time, with each record clamped to the 512-pixel framebuffer width.

In the default mode, each record is drawn as one horizontal grayscale line. Every value is scaled (magnitude 0.0 to 1.0 mapped to intensity 0-255) and written as a pixel; successive records march down the screen, wrapping back to the top when the bottom is reached. 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.

Input is typically produced by signal-processing tools such as dmod(1), dfft(1), or dconv(1). If standard input is a terminal, ddisp prints its usage and exits.

OPTIONS

-v

Vertical (point) plot mode. Each value is plotted as a single green pixel whose height above or below the center row is proportional to its value. This option also disables pausing and clearing.

-b

Bar graph mode. Like -v, but draws a solid green vertical bar from the center row out to each value, clamped to the +/- 128 pixel range.

-p

Pause for 3 seconds after drawing each record. Useful for animating successive records frame by frame.

-c

Clear the framebuffer before drawing each record. Most useful with -v or -b to produce a clean animation of each frame.

-H

Print the usage message and exit. The -h and -? flags behave the same way.

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.

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.

SEE ALSO

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

AUTHOR

BRL-CAD Team

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