Yaplot -- yet another plot in 3-D

-->Japanese page

Sample image of yaplot.
(Visualization of 3-dimensional bond percolation.)

 What is yaplot?


  • Simple animation, simple control.
  • Simple data format.

Yaplot is an easy 3D modeller and animator for visualizing the results of computer simulation.
You can browse the motion of the 3 dimentional wire frame model with text labels and some marks on the cheap PC based X terminals.
Data format is simple and intuitive.
It can also open and render several files in windows at a time.
It is useful to watch spaciotemporal data.
It is the least beautiful and not durable for presentation, but enough quick and smooth for daily use. (Do not expect much to yaplot!)


Yaplot requires gtk.

First, get the source code and expand. On linux, compile them with the following commands.

           prompt% ./configure
           prompt% make

If configure fails even when gtk is installed correctly, try the following.

           prompt% aclocal
           prompt% autoconf
           prompt% ./configure
           prompt% make

When it is compiled successfully, install them to the appropriate places.

           prompt# make install

On windows, edit Makefile.dos and try "make". Some features of yaplot are missing on Windows.


     usage : yaplot [options] infile [infile ...]
       -e x,y,z        Set the coordinate of the eye point.
       -l x,y,z        Set the coordinate of the look point.
       -u x,y,z        Set the up-vector.
       -c filename     Specify palette file.
       -q n            Specify n frames are cached in memory.(default=1)
       -d              Debug mode.
       infile          Yaplot command file.

Currently all options are unavailable on DOS.

Yaplot has the concept of layers. It has 12 layers by default. You can show/hide each layer by function keys.

When "-" is specified as the command file name, commands are read from standard input.

When multiple command files are specified, they are rendered in different windows. There are two modes of control, which are synchronous mode and asynchronous mode. When the mouse focuses to a windows in synchronous mode, your control (with mouse or keyboard) are reflected to all other windows. In asynchronous mode, on the other hand, your control are reflected only to the window where mouse is focusing.

You can alter modes by "s" key. All the windows are in synchronous mode by default.

If no command file is specified, help file is displayed.

By specifying "RECORD" option in Makefile, recording feature becomes available. When "r" key is pressed, hardcopies of the windows are saved in yaplotxx_yyyyy.gif(xx is window No.、yyyyy is frame No.) To stop recording, press "r" again.

If "u" is pressed, current view information (eye position, field of view, etc.) is saved in ".yapviewstack" file of the current directory. If "o" is pressed, last view information is recovered from ".yapviewstack" file. It is useful to share the view information on multiple yaplot. (This feature is not available on DOS)

When no palette file is specified, yaplot searches the palette file in the following order:

  1. yaplot.col file in current directory.
  2. the file specified in YAPLOTCOL environment variable.
  3. yaplot.col file in your home directory.
  4. System default palette file.

Several sample command files are included in source code package.

 User interface

You can control yaplot by mouse and keys.

Key assignments are listed below.
Commands marked with "!" mark are "repeatable commands". Pressing number keys before repeatble command key makes the same effect as pressing the command key repeatedly. For example, pressing "5" "N" is the same as pressing "NNNNN" (animate in 5fps).
When you mistype the number, press ESC key to escape.
All the repeatable commands ( except "g" and "f" ) are relative, i.e., pressing "10N5P" is the same as "5N".

Up and down arrow, or "j" and "k"
Pitching rotation.
Left and right arrow, or "h" and "l"
Heading rotation.
Mouse drag with left button
Rotate immediately
Pause or "!"
Stop automatic rotation.
Undo rotation.
"*" and "/"
Scale up and down
"[" and "]"
Zoom in and out
Start/stop recording.
pUsh; Push current view information in the view stack.
pOp; Pop current view information from the view stack.
PageDown or "n"
Next frame.
PageUp or "p"
Previous frame.
Numeric keys followed by PageDown or "n" with shift
Prograde animation.
Numeric keys followed by PageUp or "p" with shift
Retrograde animation.
Numeric keys followed by "g" or Enter
Jump to the frame specified by numeric keys. Single "g" to the first frame, single "G" to the last frame.
Stop all automatic actions(Rotation and animation)
"+" and "-"
Change rendering fidelity.
Insert and Delete, or "(" and ")"
Gradate line thickness.
Function keys, or numeric keys followed by "F"
Toggle show/hide of the layer.
Change verbosity.
Toggle synchronous/asynchronous modes.
"q" or Break
Quit yaplot.

 Command file format

One line of the command files corresponds to one command. A command consists of a single command character followed by parameters separated by at least one space character, Any parameters are not omittable.

r {radius}
Specify the radius of circles, rings, and sticks.
l {x} {y} {z} {x} {y} {z}
Draw a line.
s {x} {y} {z} {x} {y} {z}
Draw a stick,
p {n} {x} {y} {z} {x} {y} {z} {x} {y} {z} ...
Draw a polygon
c {x} {y} {z}
Draw a circle.
o {x} {y} {z}
Draw a ring sign.
3 {x} {y} {z}
Draw a triangle sign.
4 {x} {y} {z}
Draw a square sign.
5 {x} {y} {z}
Draw a pentagon sign.
6 {x} {y} {z}
Draw a hexagon sign.
t {x} {y} {z} {text....}
Draw a string.
@ {n}
Specify palette No. (Palette colors are specified in palette file.)
@ {n} {r} {g} {b}
Specify color of the n'th palette. r,g,b are integer between 0 to 255.
# {comment}
Comment. (Ignored.)
y {layer}
Change current layer(default layer=1)
Empty line
End of a frame.

 Palette file format

Each line of the palette file specifies the Red, Green and Blue intensity of the pallete. First line describes the color for palette 0. As the palettes 0 to 2 are reserved for system color (Black, Gray, and White), you should not modify them.

 Internal behavior

 Related materials

  • MDView Molecular Dynamics Viewer.






<< 2019-4 >>
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30








fractal noise