3D Display Modes
Previous  Top  Next

These drawing modes can be selected in the Display Mode submenu of the Display menu , or the Dialog Bar - Left .
Although a shaded SHAPE drawing in the Standard display mode using Shading (Input1 Menu) has a good 3-dimensional appearance, the term "3D drawing" is used to denote a method of drawing which is different in several respects. SHAPE uses the OpenGL system software package for Windows, Macintosh and Linux and the Direct3D package for Windows (only).

In this type of drawing, the surfaces of three dimensional objects such as spheres and cylinders are converted to an assemblage of planar polygons. Then each polygon is drawn essentially independently. The critical difference from non-3D modes is that a depth buffer is used in 3D imaging. This is an array of integers, one for each pixel in the display or output (or that portion which is currently being drawn). Each element, representing a pixel, holds the relative x coordinate (in the SHAPE observer coordinate system) of the foremost object or polygon. The color for this object is retained in the color buffer , which is a similar array representing pixels; this array is actually the image itself. Whenever a polygon is drawn, each pixel which it contains is compared against the depth buffer; if the x coordinate of the pixel is greater, or closer to the observer than what is in that element of the depth buffer, the color for this pixel in the new polygon replaces the value in the color buffer. That is, the depth buffer keeps track of the front surface of the drawing, and ensures that only this front surface (not any hidden surfaces) are kept in the color buffer or image itself. It is also possible to have transparent or translucent objects, through which hidden surfaces may show partially.

Actually, the "double buffer" method is normally used, the color buffer being kept in an area of memory and then copied to the screen memory when the drawing is completed. This is usually faster than drawing directly to the screen.

The non-3D display modes of SHAPE do not use a depth buffer: the back edges are drawn and then the front edges and faces (except for the Anaglyph mode). When necessary, the intersections of objects are solved analytically and only the required portions of each are drawn.

There are two main advantages to using the 3D display mode in SHAPE. First, display of symmetry elements (rotation axes and mirror planes) is supported only in the 3D modes, because the intersections of these objects with each other and with crystal faces and edges is too complex for the methods used in standard modes. Second, correct shading of multiple crystals (twins and epitaxial intergrowths) can only be guaranteed in 3D modes, for similar reasons.

The 3D modes also allows for more elaborate lighting effects (see Lighting Equation and Material Parameters), although these are not of as much use for simple polyhedra as for other objects. The shading of curved surfaces (which in SHAPE means only cylindrical edges and crystal or symmetry axes, and some symmetry symbols) is more satisfactory in that the color (shading) at each point in a polygon is linear interpolated from the values calculated from "normals" supplied for each corner. Since this may call for very fine gradations in color, the greater the color resolution of the device (the more color bits per pixel) the better the result will be. 3D drawing will work with an 8-bit (256-color) display driver, but is usually much better with 16-, 24- or 32-bit display. The color resolution may be set in the Display control panel of Windows 95/98/NT.

The 3D modes usually draw only surfaces , not edges or intersections of surfaces. To show edges it is necessary to specify them independently and draw them as cylinders or lines.

Note that OpenGL does not support shadows, refraction and many other effects which make for a truly realistic drawing of a transparent object like a crystal. The freeware ray-tracing program POV-Ray can do much of this, and SHAPE can optionally write data files readable by POV-Ray (see List Results).

3D drawing is a raster method, and therefore is not supported in pen plots or metafiles - it is supported for the screen, dot-matrix, laser or ink-jet printing, and Raster Files.