polyhedra


JSV1.07 can only display tetrahedra and octahedra. However, you may add individual triangular polygons which would form cubes, squares etc. for a VRML output. The problem in a program like JSV is how to generate the polyhedra. This is a very complex procedure even for simple polyhedra. Required are lists with vertex coordinates for each facet and those vertices have to be ordered in a certain way so that connecting them really results in a polygon and not in self-intersecting lines. The display of polyhedra in JSV is quite difficult, since JSV uses actually 2D graphics only. In real 3D graphics everything, even the spheres (atoms), cylindrical bonds, polyhedra etc. is polygonized and the used 3D engine takes care of displaying interpenetrating atoms, bonds, polyhedra etc. correctly. JSV uses a simple painter's algorithm where one starts drawing from the back towards the observer. This works quite fine if only non-interpenetrating atoms and bonds are used (ball-and-stick model). With polyhedra it gets difficult. In the painters algorithm usually only those polygons are drawn, whose normals face towards the observer, whereas the ones facing away would be hidden by the visible polygons and don't have to be drawn. Of course this works only if the polygons form closed polyhedra. If you were to specify single individual polygons, that do not belong to a closed polyhedron, you would see them appear and disappear as you rotate the structure. In order to experience real 3D you may view VRML files, which can be written by JSV.

Now back to the generation of polyhedra. Other programs usually use a technique where a central atom, its ligands and their distances from the center have to be specified. In that case, however, you cannot generate polyhedra which have no central atom (eg. empty tetrahedra, which occur frequently). Thats why JSV uses a different approach. I wanted to allow also empty polyhedra to be generated. Here is how it is done: You go into the display mode numbers, so that you can see all individual atom numbers (kind of a serial number). Then you select the ones that are to form the vertices of a tetrahedron/octahedron and make the corresponding entry in the input file. Then you activate the change by selecting the present number of unit cells from the menu [Cells]. One thing you have to be aware of is that the atom numbers for a chosen polyhedron might not be valid for another choice of numbers of unit cells. This is because the space group routine generating the atom positions might assign other numbers to them. I will try to improve that in a future version. You should always write a SDF file after you modified the structure to your liking, so that you don't have to do the same steps again the next time you want to see that structure.

Well, when you activate the changes the following happens. From the specified vertices JSV calculates the center of gravity as a virtual central atom position (it does not matter if there really is an atom or not). Then the space group routines are used to find all equivalent positions for that imaginary "central atom". Then for each of those positions the surrounding atoms are searched for the ones which are equivalent to the specified vertices. Then the polygons are specified and the vertices ordered in a clock-wise fashion. This ensures that the polygons are visible when they face towards the observer. Otherwise they will not be drawn.

As mentioned in the helpfile for Menus you may create individual polygons from the menu [Option] [add polygon]. In any case I will try to improve this whole matter of generating polyhedra in future updates.

1) click here to see how to make tetrahedra

2) click here to see how to make octahedra