Indiana University Bloomington
  Contact
IUMSC   Indiana University Molecular Structure Center

Use the "View source" button to see how this applet is loaded onto the page. In general, the applet is treated as any other html tag, it's just a bit harder to incorporate. Below is the same applet, but with a smaller "box size".

In addition to the size of the applet, the user specifices the "model" file and the scale for the drawing.  The scale is best determined by experimenting, but usually ranges from 0.5 to 1.3.

The input (model file) to the applet is this case is the file cube.obj, which is:

6 1.0 1.0 0.0
p 4
1.0 0.0 0.0
1.0 1.0 0.0
0.0 1.0 0.0
0.0 0.0 0.0


p 4
0.0 1.0 1.0
1.0 1.0 1.0
1.0 0.0 1.0
0.0 0.0 1.0

p 4
0.0 1.0 0.0
0.0 1.0 1.0
0.0 0.0 1.0
0.0 0.0 0.0

p 4
1.0 1.0 0.0
1.0 1.0 1.0
0.0 1.0 1.0
0.0 1.0 0.0

p 4
1.0 0.0 0.0
1.0 0.0 1.0
1.0 1.0 1.0
1.0 1.0 0.0

p 4
0.0 0.0 1.0
1.0 0.0 1.0
1.0 0.0 0.0
0.0 0.0 0.0
The first line gives the number of planes to be drawn and the color (in this case 1 1 0)  This is followed by six sets of coordinates of the style:

p n  where n is the number of points for the plane
x1,y1,z1 coordinates of point one
x2,y2,z2 coordinates of point two
.......
xn,yn,zn  coordinates of last point.

The points must be given in a clockwise direction (as seen from the outside) in order.


Content last modified 06/24/02

Back to Top

Indiana University
Indiana University Molecular Structure Center. Chemistry, A421, Indiana University, 800 E, Kirkwood Ave., Bloomington, IN 47405-7102, 812.855.6821
Privacy Policy | © The Trustees of Indiana University, Copyright Complaints