V M e c h . c o m
V i r t u a l   M e c h a n i s m s
Fighting immechanacy on the Web

Site Map


  1. Introduction
  2. Java3D Models
    1. Sun's HelloUniverse
    2. Simple Crank
    3. Crank Rocker
    4. Drag Link
    5. Four Bar Linkage Beta
  3. Papers (in progress)
    1. Machines in Java3D
    2. Inverse Kinematics on the Scene Graph
    3. Simulations on the Web
    4. 'Time' in Java3D
  4. Appendices

A.     Installing the Java2 Plug-in and Java3D

B.     Security and Java applets

  1. References
  2. About VMech.com

3.1 Machines in Java3D

Introduction

This paper outlines the approach the VMechanic took to building and animating machines and mechanisms in Java3D. At the outset, he felt that he had a pretty good handle on the scene graph. The scene graph tree is, after all, almost identical to the framework on which modern theoretical kinematics is based (Refs 5.1, 5.2.) There were two practical issues, though, that he had no idea whatsoever how to approach. The two issues were: motivation - what made the machines move, and kinematics - how did he solve the kinematic constraints and where did he put the code for that.

The sections that follow first discuss some background, and then describe the ways that the VMechanic animated the machines and solved their kinematics.

The Scene Graph

The VMechanic builds and assembles a Java3D machine by placing objects on a 'scene graph,' which is an acyclic (meaning it has no loops) tree structure. (The Java3D scene graph usually has at least two main branches, one representing the viewer and the other what is viewed. The models here use a simple generic viewer, so these sections discuss only the 'viewed' part of the scene graph that represents the machine.)

The object types include the following: 1.) renderable geometric shapes (the Java3D Shape3D object) that represent machine parts, 2.) transformations (TransformGroup) that describe relative spatial positions of the parts and that are used to represent machine joints and supports, 3.) prime movers (Behavior) that are used to specify motion inputs, and 4.)a sort of glue or weld object (BranchGroup) needed to hold the tree (or the machine) together. Java3D has racks full of other tree parts and ornaments, but to describe how to build machines and mechanisms, the above four types are enough.

(to be continued)

Last revision
October 17, 2000
email the
VirtualMechanic

Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. VMech.com and Brock Engineering are independent of Sun Microsystems, Inc.
Except as noted, all other material © Fred Klingener 2000. All rights reserved.