Make your own free website on Tripod.com

Dynamic Tensegrity Views

Java3D-Based Tensegrity Viewer


Last revision: June 13, 2008

This is a Java3D-based interactive viewer for some tensegrity structures with simple hubs from the Synergetics Gallery. Most are tensegrities and from there anyway. Your Java runtime environment has to be augmented with the code for Java3D which is available from Sun. In contrast to the plain-vanilla Java version of the viewer, this Java3D version displays the interlayer tendons for all of the double-layer tensegrities.

Usage

The choice box allows a model to be chosen.

To rotate the figure, press and hold down the left mouse button in the viewing area and move the mouse across the viewing area. The front of the model rotates in the direction the mouse is dragged.

To shift the figure, press and hold down the CTRL key while pressing and holding down the left mouse button in the viewing area and moving the mouse in the desired direction of shift. You can move between the shift and rotation mode simply by pressing (takes you from rotation mode to shift mode) or releasing (takes you from shift mode to rotation mode) the CTRL key while moving the mouse with the left button pressed. It's easy once you get used to it.

The right scrollbar allows a magnification of the figure by up to eight times.

The Viewer

Contact Information

Bob Burkhardt
Tensegrity Solutions
Box 426164
Cambridge, MA 02142-0021
USA

e-mail: bobwb@juno.com

Your comments are welcome. The relevant source code files are TViewJ3D.java, JModelMenu.java, JThreeD.java, Java3DModel.java, Model3D.java, Cylinder.java and Strut.java. TViewJ3D.java also contains the class TViewJ3DPgm which allows the viewer to function as a stand-alone Java application program. In this mode, it does the same thing as the applet, but looks for the model data files on the local file system. If you just want a stand-alone Java3D application program to view single models, use JView.java instead of TViewJ3D.java.

The model data files are available in the "models" subdirectory of the directory this file is in. The meaning of each line of text in a data file is determined by the first character on the line. The first character is either "#", "v" (stands for "vertex") or "l" (stands for "line"). Text lines starting with "#" are comments and are ignored. Text lines starting with "v" are coordinate data for the points (a.k.a. vertices). Cartesian x, y and z values are given in floating-point format. Text lines starting with "l" indicate how geometric lines connect the points. The data are three integers. The first two integers are zero-based indexes into the vertex array. The third integer is a "type" value and determines the color of the geometric line. For tensegrities, geometric lines where the type (mod 8) is 1 are struts.

Dynamic Tensegrity Views