JavaScript Lattice Drawing Program

Number of Elements:

Covers:

B3 B4 M3 N5
D1 EX SubA4 Grid
Crown P Q FD3
FL(3+1) BA5 BA6

Directions

This is a JavaScript program for drawing ordered sets (including lattices). The idea for the program is based on Ralph Freese's much more sophisticated program at www.math.hawaii.edu/~ralph.

If you have no idea what an ordered set is, or if you just want to play and see what happens, press the "Improve" button above and play with the arrows.

"Reload" will start the drawing process over. This is sometimes necessary if the initial (random) positions are just "bad."

"Stop Improving" stops the drawing process. "Latex Code" will give code for drawing the lattice with Latex and xypic.

To see a different example, select an example from the list and press "Load Example." You can also enter you own example by typing cover pairs in the provided space. Parenthesis, commas, braces, etc. are irrelevant and ignored by the program -- but they may help you to keep the pairs straight.

Explanation

Elements of the ordered set are viewed as point masses in space. The z-values of the points are determined by their height and depth in the ordered set. These values remain constant throughout the drawing process. Initial x-values and y-values are random. Forces are applied to the points, and the points are allowed to move to try to find some sort of minimum energy position.

When improving the diagram, three types of forces are applied to the masses.

Browsers

This program has been tested on Chrome, Opera, Firefox, and Internet Explorer. It runs best (by far) on Chrome. This means that the motion of the ordered sets stabilizes more quickly and the animation is smoother on Chrome. The program runs on Opera and Firefox but more slowly.

IE does not natively support the canvas tag used for the graphics. It has to be emulated with excanvas. The physics and the graphics are SLOW on IE -- so much so that one should not claim the program works on IE. In short, don't use IE with this program. If you must, and if you want to draw a larger ordered set (or even one with more than five elements), press "Improve" and go make a sandwich or something.