- personal pages - software
Software for doing simple rotations of 3-D data
This is a very simplistic way to rotate data in 3-D.
Click here to download software. To compile, use "cc -o rotate rotate.c -lm".
To use the software, you can either specify the filename or pipe the data into the program:
The program does a rotation theta around the Y-axis, then a rotate phi around the (current) X-axis, finally a rotation eta around the (current) Z-axis. The origin is taken to be the center of the data, although this can be changed with the -C option. By default, the output also contains data points which are a large rectangular box drawn around the data. This can be turned off with the -B option.
Command line options:
-h : a help message listing these options
-t # : change theta (degrees)
-p # : change phi (degrees)
-r # : change eta (degrees)
-C : do NOT rotate around the center of mass
-B : do NOT draw a box around the data
-s # : change the spacing of box points
To make this picture, I typed:
To make the file sphere.dat, I used a gawk script:
If you have questions, please send me email (email address below)
The graph was made with a program I wrote, psdraw. This program is public domain. The program makes PostScript output which I then converted to GIF.