Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
4va(1)			    General Commands Manual			4va(1)

       4va,  ctorus,  cutctorus, 4vdmake - 4D object tumbler for X-Windows and
       object generation programs

       4va [{ -xy -xz -yz -xw -yw -zw }	_angle_	] [-np]	[-ns]  [-nt]  [-cw]  [
       -zd  _dist_  ]  [  -wd  _dist_  ] [ -lc _color_ ] [ -bc _color_ ] [ -lw
       _width_ ] [ -d _display_	] [ -s _scale_ ] [ -h |	-? ] _object-file_

       ctorus _x-increments_ _y-increments_
       cutctorus _x-increments_	_y-increments_

       4vdmake _x-grid-size_ _y-grid-size_

       4va is a	fourth dimensional visualization  program  for	X-Windows.  It
       takes  as  input	 a file	describing an object in	up to 4	dimensions and
       tumbles it in a window according	to rotation values given on  the  com-
       mand line.

       -xy, -xz, -yz, -xw, -yw,	-zw _angle_
	      Specify  the  amount  of	rotation  each	cycle in each of the 6
	      planes (x-y, x-z,	and so on). The	angle is given in degrees  and
	      appended	directly to the	option,	as in -xw4.5.  If any of these
	      options are set on the command line, the defaults	 are  cleared.
	      The defaults are -xz0.6, -xw0.6, and -yw0.45.

       -np    Tell  4va	not to do perspective. Normally	perspective is done on
	      both the z and w axes.

       -ns    Don't rescale the	object in the window if	the window is resized.
	      Normally,	 if  the  window is resized, the object	is rescaled in
	      proportion to the	new window size.  Specifying  -ns  turns  this

       -nt    Don't  set  a  name  for the title bar. On some window managers,
	      this will	suppress a title bar even being	displayed on the  win-

       -cw    Tell  4va	 to clear the window each cycle	with a call to XClear-
	      Window() instead of drawing over the old	object	in  the	 back-
	      ground  color.  Using  -cw  is  nice for larger objects, but for
	      smaller objects letting 4va draw over the	lines  is  faster  and
	      doesn't flicker.

       -zd _dist_, -wd _dist_
	      Specify the viewer's distance, in	pixels,	along the z and	w axes
	      for perspective purposes.	Naturally this doesn't have much mean-
	      ing  if -np is specified.	The default is 430.0. Place the	number
	      directly after the switch, as in -zd400.0.

       -lc _color_, -bc	_color_
	      Specify the names	of the foreground (line) and  background  col-
	      ors,  as	in  -lc	LightGreen.  The defaults are black background
	      with red lines.

       -lw _width_
	      Specify the width	of the object's	lines, in pixels. The  default
	      is a width of 0, which is	the hardware-defined fastest line. Ex-
	      ample is -lw5.

       -d _display_
	      Specify the display name.	4va first checks the -d	 switch,  then
	      the DISPLAY environment variable,	then then defaults to the dis-
	      play unix:0.

       -s _scale_
	      Specify the scaling  factor  for	all  four  dimensions,	as  in
	      -s150.0.	The default is 200.0.

       -h, -? Get a listing of 4va's options.

   Ctorus, cutctorus, and 4vdmake options
       These three programs are	object file generators for 4va.	 Ctorus	gener-
       ates a Clifford Torus with the densities	named. For example, ctorus  20
       20  will	 generate a Clifford Torus file	with 20	increments around each
       of the two sets of circles defining the torus (the x-y set and the  z-w

       Cutctorus  is the same as ctorus, except	that all of the	circles	in one
       direction are invisible,	making the torus easier	to see.

       4vdmake is a "customizable" object generation program that produces ob-
       jects  in  three	dimensions. The	program	generates a grid of points and
       lines on	the x and y plane and applies to them a	function  (defined  in
       the  code)  for the z value of each coordinate. This is a quick hack to
       let 4va display 3D functions. It	can easily be modified to generate  4D
       functions.  4vdmake fits	the grid (with the density on the x and	y axes
       given on	the command line) into a -1 to 1 square	on the x and y axes.

   Object files
       Object files (usually with the extension	.4vd) have the following  for-

	      p={ number-of-points }


	      l={ number-of-lines }



       For example, a simple object file for a single line might look like

	      1.0 1.0 1.0 1.0
	      -1.0 -1.0	-1.0 -1.0
	      0	1

       If  the number-of-points	and number-of-lines do not match the number of
       points and lines	in their sections, 4va will read the incorrect	amount
       of  data	 from  the object file and will	get confused.  As you can see,
       each point specifies the	x, y, z, and w coordinates  as	floating-point
       numbers.	 If you're only	creating a 3D object, for example, you can set
       all the w values	to 0.0.	Each line specifies the	points	between	 which
       the  line extends. In the above example,	we have	one line between point
       0 and point 1 (notice that numbering starts with	0).

       4va allocates memory for	objects	dynamically. If	4va runs out of	memory
       it  will	 exit with a return code of -1 and print a "malloc" error mes-

       4va does	not check that the object file that it's reading  is  well-be-
       haved.  If your object file is corrupt, 4va may hang.

       4va has worked on every system I've tried it on;	it's basic enough that
       it should port to your machine. If you have problems, let me know.

       Matt Welsh ( Please send me any questions,	 bugs,
       or suggestions.

				     X11R4				4va(1)


Want to link to this manual page? Use this URL:

home | help