Crystal-modeler: A tool for geometric analysis and three-dimensional modeling of crystal forms based on rectangular coordinates in space

Various classification approaches have been developed for geometric form of crystals. One method involves the generation of three-dimensional (3D) models of crystals, mainly through graphical representations. However, traditional graphical representations mainly depend on symmetrical operations of crystal planes and the application of polar stereographic projections. There is still very few geometric analysis or mathematical expression for the rectangular coordinate system, implying the limited 3D visualization of crystal forms. In this paper, we present a newly geometric analysis that allows 3D visualization analysis of crystal forms and further identifies geometric relations between crystal forms. In detail, crystal models are divided in a 3D rectangular coordinate system within 47 types of geometric form into the tetrahedron, polygon (polyhedron), and cube classes. What’s more, we determine the vertex space coordinates of the 47 types of crystal form through geometric analysis and coordinate calculation of the crystal forms. Last but not least, in order to obtain 3D models of every geometric form under the automorphism of crystals, it is the convex envelope geometric polyhedron algorithm created to calculate the edges and triangular faces by WebGL technology, which makes it possible to accomplish an online interactive 3D crystallographic study system in a web-browser.


Introduction
A crystal is a solid substance formed by internal particles (atoms, ions, or molecules) arranged in three dimensions (Shengrong et al. 2008;Borchardt-Ott 2011). The study of crystal morphology is the foundation for the development of crystallography.
Exploration of the symmetry and internal structure of crystals originated from an understanding of the macroscopic geometric polyhedral shapes of natural mineral crystals.
Mathematical methods adopted to study crystal morphology and symmetry are a critical tool for comprehending the symmetry of crystals and the morphology of quasi-crystals and crystal aggregates, which involve spatial geometry, analytic geometry, linear algebra, and group theory, amongst other approaches. Examples of such methods include the derivation of 32 symmetry types of crystal macro-morphology and the proposition of the geometric theory of symmetrical crystal structure (Shengrong et al. 2008;Borchardt-Ott 2011;Hurlbut and Dana 2001;Nespolo 2015;Nespolo 2017;Quncheng 2012;Quncheng 2016).

3
A crystal form is a combination of crystal planes connected by symmetrical elements (Shengrong et al. 2008). Previous studies have proposed various classification schemes for crystal form morphology, including plane, column, mono-cone, bi-cone, facet, partial facet, tetrahedron, octahedron, and cube types of crystal form. According to their features of symmetry, the 47 types of geometric crystal form can be divided into 32 non-equiaxial crystal forms and 15 equiaxial crystal forms in total (Borchardt-Ott 2011; Hurlbut and Dana 2001;Prince and Paufler 1982;Donnay and Donnay 1978). Crystal forms can be divided into special or general shapes on the basis of the relationship between a single crystal plane and the symmetrical elements, into open or closed shapes on account of whether the crystal surface of a single shape can be closed by itself, into fixed or variables shapes on the grounds of whether the angle between single crystal planes is constant, and into left or right shapes on the fundamental of whether two crystal forms have mirror reflection (Shengrong et al. 2008;).
Analysis of crystal structure and morphology requires a sophisticated spatial conceptualization. It is difficult to analyze how many planes and axes of symmetry are involved and whether there is a center of symmetry using only manual models and plane wall charts. For this, previous studies have used three-dimensional (3D) models of crystals together with drawing methods such as spatial symmetry and 3D graphics software programs such as Carine CrystalMaker Demo, Diamond, Findlt, VEST and Shape (Congote et al. 2011;Weiguo and Fanfei 2018;Hao et al. 2015;Zhiyang and Fei 2016;Fei et al. 2017;Pingke et al. 2014;Qingjie et al. 2021;Hai et al. 2019;Jinhua et al. 2020;Xiaoyan and Xinrong 2012). However, these ones do not enable an in-depth analysis of crystal form geometry, as they do not provide interactive display modes during 3D visualization, indicating that the inherent geometric connection between crystal forms cannot be fully understood. Fortunately, recent advancements in computer 3D visualization have brought new tools to solve (Siyi and Mingyue 2017; Mascarenhas 2020; Lu et al. 2019;Bardella et al. 2018). WebGL technology provides a new idea for the construction of 3D crystal model, and this paper dominantly carries out the preparation and foundation work of WebGL modeling.
There are 47 types of geometric form of crystals geometrically analyzed, and we construct a new classification system for crystal forms in the light of geometric transformations of the crystal forms, as well as expound on the inherent geometric relationships between the crystal forms, intending to reveal that the geometric form in each class of the system has particular feature of derived morphology. Moreover, It is demonstrated that the 8 geometric form morphological transformation methods that allow the generation of all geometric form models. Furthermore, the vertex coordinates of all geometric forms are established in the 3D Cartesian coordinate system. These coordinate data vertices can be applied to generate crystal form models by various software programs. On top of that, our work provides a geometric basis and conceptual model for the subsequent production of 3D visualization models, which could help to understand the spatial characteristics and derived morphology of geometric forms, also enrich theory and methodology within mineralogy and crystallography fields.
Research indicates that the WebGL technology can fall into the virtual display and visualization of products in multiple fields, bringing about the corresponding front-end graphics application, which greatly meets the requirements for the display of some 3D scenes and model products (Siyi and Mingyue 2017). Based on geometric analysis of the crystal forms and the HTML5 standard, we could develop the online application system of 3D crystallography in the browser through Three.js, the open source WebGL thirdparty library, and finally realizes the online application across Windows, Android, Apple and other operating systems, so as to build an intuitive and visualized platform for online learning and communication.

Morphological evolution and classification of crystal forms
In this paper, 47 types of crystal geometric form are divided into three classes from the perspective of model construction: tetrahedron, cube, and polygon (polyhedron) classes. Of these, the tetrahedron class contains 8 types of geometric form, the cube class contains 5 types, and the polygon (polyhedron) class contains 34 types that are spread across four subclasses (Table 1). The geometric crystal forms in each class can be used to determine spatial relationships through geometric correlation, allowing determination of the vertex coordinates of the crystal forms. It is known that in each class, one crystal form becomes another crystal form by some transformation operation.

Tetrahedron class
The tetrahedron is the simplest geometric polyhedron in 3D space. It is composed of 4 planes, 6 sides, and 4 vertices. In crystal geometric forms, the tetrahedron class includes 8 types of geometric form ( Fig. 1; Table 1). The regular tetrahedron is the basic shape in tetrahedral geometric crystal forms, and others can be derived from it by the transformation operations. See Sect. 3.1, 3.2, 3.3 and 3.4 for details.

Polygon (Polyhedron) class
In geometric form analysis, the polygon (polyhedron) class is defined with regards to the tangent shape perpendicular to Cube, Tetrahexahedron, Pyritohedron, Diploid, Rhomb-dodecahedron Fig. 1 Geometric evolution of tetrahedral crystal form. Note: plane center: the center of the crystal plane, that is, the center of the circle surrounding the crystal face (polygon), also known as the outer center. edge center: the center of the crystal edge; edge line: the crystal edge the crystal high order axis. From the perspective of model making, we divide the polygon class into the equilateral triangle, regular quadrilateral, regular hexagon, and parallelogram subclasses. The 4 sub-classes of polygon giving the basic form and derived geometries are presented in Table 1.
In nature, only these 4 subclasses of polygon can form the elements of a polygonal geometric form. Upper and lower regular polygons form a square column. A pyramid is originated from a regular polygon and a point on the vertical line passing through the center. A dipyramid stems from a regular polygon and 2 upper and lower points on the vertical line passing through the center. In this type of derivation, a compound prism, a compound pyramid, and a compound dipyramid can be regarded as being derived from a compound polygon. A compound polygon is derived from a regular polygon.
There are 9 types of form in the equilateral triangle subclass (Fig. 2). In this subclass, the equilateral triangle is the basic form, which is transformed into the trigonal prism, trigonal pyramid, trigonal dipyramid, ditrigonal prism, ditrigonal pyramid, and ditrigonal dipyramid. The more complex trigonal trapezohedron, rhombohedron, and ditrigonal scalenohedron are derived from the trigonal pyramid. There are 9 crystal forms in total (Fig. 2).
There are 12 types of form in the regular quadrilateral (square) subclass (Fig. 3). In this subclass, the square is the basic form, which is transformed into the tetragonal prism, tetragonal pyramid, tetragonal dipyramid, ditetragonal prism, ditetragonal pyramid, and ditetragonal dipyramid. The tetragonal trapezohedron can be originated from the tetragonal pyramid. The octahedron, trigonal trioctahedron, hexaoctahedron, trapezohedron, and gyroid are taken from the tetragonal dipyramid.
There are 7 types of form in the regular hexagon subclass (Fig. 4). In this subclass, the hexagon is the basic form, which is transformed into the hexagonal prism, hexagonal pyramid, hexagonal dipyramid, dihexagonal prism, dihexagonal pyramid, and dihexagonal dipyramid. The hexagonal trapezohedron is derived from the hexagonal pyramid.
The crystal geometric forms of tetrahexahedrons, rhombdodecahedrons, pyritohedrons, and diploids come from cubes. Moreover, the center of the cube can be extended by a certain distance, and the planes of each square then divided into 4 identical isosceles triangles, thus forming a tetrahexahedron. In the case where the distance of extension of the plane center is half the side length of a cube, a rhombdodecahedron is generated.
The distance of outward extension and the length of center-line segmentation are forced to satisfy a certain relation to ensure that the basic component polygon of the geometric form is a pentagon.
A pyritohedron is generated when the center line of the cube face is extended and the length of face-center-line segmentation and distance of the outward extension meet certain conditions (see the geometric analysis in Sect. 3.7 below). Based on the pyritohedron, the midpoint of the edge center line of the pyritohedron (that is, the extension of the surface center line of the cube) extends outward to form a diploid (Fig. 6).

Geometric analysis and coordinate calculation of crystal forms
There are 3 classes of crystal geometric forms based on a basic shape, and a series of derived crystal forms are obtained through geometric transformations. For example, the tetrahedron and cube classes are founded on a regular tetrahedron and a cube, respectively, and subclasses of the polygon (polyhedron) class are on the basis of an equilateral triangle, a regular quadrilateral, a regular hexagon, and a parallelogram, for each of which a 3D rectangular coordinate system can be established. The vertex coordinates of the derived form are determined through geometric transformation operations, including plane-center extension, edge center extension, three-segment rotation of the edge line, and geometric rotation.

Derivation of a plane-center-extended form
A regular tetrahedron comprises 6 plane diagonals of a cube. Therefore, a tetrahedron can be considered as a half cube with half its vertices: A 1 , B 2 , C 1 , and D 2 (Fig. 7). The center of a regular tetrahedron is taken as the origin O to establish a 3D Cartesian coordinate system. Let the side length of the cube be 2r; then, the coordinates of the 4 vertices of a regular tetrahedron are (r, − r, r), (r, r, − r), (− r, r, r), and (− r, − r, − r). If N points are added on the plane-normal line, where N is the number of planes, then a trigonal tritetrahedron, a deltoid-dodecahedron, and a hexatetrahedron can be derived.
As an example, a trigonal tritetrahedron (with 12 planes, 18 edges, and 8 vertices) is derived as follows. It is first extended outward from the central point of the 4 planes of a tetrahedron. In other words, the normal vectors OA 2 , OB 1 , OD 1 , and OC 2 along the 4 planes of the tetrahedron extend outward by a distance S (Fig. 7b). The minimum value of s is PO, and the maximum is B 1 O.

Similar triangulation results in:
For which we set: And: Then, point P on the plane-centered outward extension vector OB 1 is (s, s, s), with s taking the value [r/3, r].

Derivation of an extended crystal form with the edge center
In the case where the center of the geometric form is connected to the long edge center, N points are added at N long edges for outward extension of the derived form.
Here we take the hexahedron as an example, which can be derived from a trigonal tritetrahedron (Fig. 8). A trigonal tritetrahedron has 18 edges, including 6 long edges, so 6 points are added at the centers of 6 long edges. It is externally extended by 6 trigonal tritetrahedron long edge centers, extending outward by distance t in 6 directions along the X, Y, and Z axes (the central O of the trigonal tritetrahedron is connected to the center of the 6 long edges), respectively. The smallest value of t is r, which yields a hexahedral form.

Derivation of a coplanar form with plane center and edge center
The deltoid dodecahedron has 12 planes, 24 sides, and 14 vertices, and it can be derived from the hexatetrahedron. In the case where the vertices C 1 , Oy, P, and Oz in the hexatetrahedron (Fig. 8) are coplanar, the two adjacent triangles beyond the tetrahedral vertices are coplanar, so that their smallest constituent polygons are transformed into quadrilaterals, and the resultant monomorphism is a deltoid-dodecahedron.
Given that the three vertice coordinates are (x 1 , y 1 , z 1 ), (x 2 , y 2 , z 2 ), and (x 3 , y 3 , z 3 ), an equation can be set as a(x − x 1 ) + b(y − y 1 ) + c(z − z 1 ) = 0 (dot method). The coefficients a, b, and c are determined as follows: That is, the general formula for the plane equation over three coordinate vertices is ax + by + cz + d = 0, where d = − (ax 1 + by 1 + cz 1 ). As C 1 , Oy, Oz, and P are coplanar and have spatial vertice coordinates of C 1 (− r, r, r), Oy (0, t, 0), and Oz (0, 0, t), we substitute the solution formula for the tobe-determined coefficients, which gives a = t 2 − 2tr, b = c = − tr, d = t 2 r. After substituting the coordinates of vertice P (s, s, s) again, the coplanar expression for the center of the plane and the center of the edges is as follows: at which vertice the hexatetrahedron is transformed into a deltoid-dodecahedron.

Derivation of a form by three-segment rotation of the edge line
Crystal form derivation by three-segment rotation of the edge line is a unique conversion method. On the basis of the original geometry, the edge of the geometry of a crystal form (10) s = tr 4r − t is divided into three parts, and will be one of the middle parts of external rotation for 2 points again, and at the same time a point is added to the center of each crystal plane, as explained in Fig. 9. These points are combined with the original vertices to form the geometry. On account of the direction of rotation, a polyhedron can be divided into left and right types.
Taking the tetartoid as an example. This crystal form has 12 planes, 24 sides, and 20 vertices, with each plane being a pentagon. Each facet of a tetrahedron is transformed from a central projection into 3 identical facets, and no facet is parallel to another ones.
In Fig. 9a, the vertices of the tetrahedron are A 1 , C 1 , B 2 , and D 2 , and the gravity center of the A 1 B 2 C 1 plane is P. In Fig. 9b, S 1 and S 2 divide edge A 1 B 2 into 3 segments, with Ox being the midpoint of edge A 1 B 2 . S 1 S 2 is the result of rotation of the middle part of the tetrahedron with edge A 1 B 2 divided into 3 segments. In Fig. 9c, T 1 and T 2 divide edge A 1 C 1 into 3 segments, with O 1 being the center point of edge A 1 C 1 . Where S 1 , S 2 , T 1 , P, and A 1 are coplanar, they form the base pentagon of a tetartoid (Fig. 9b).

Regular polygon conversion
In the geometry of a regular polygon, the center of the polygon is the center of a circle and the length from the center to the vertex can be rotated at an angle with the radius of the center to the vertex (Fig. 10). That is, x = r × sin(α) and y = r × cos(α), where r is the radius of rotation and α is the angle of rotation. As an example, a positive triangle (equilateral triangle) can be applied to derive a positive trigonal prism, a positive trigonal pyramid, and a positive trigonal dipyramid (Fig. 2), as follows: (1) An equilateral triangle (Fig. 10) is rotated 120° each time, taking the values of 0°, 120°, and 240°, respectively. The coordinates of the 3 vertices of the right triangle are A (r, 0), B (r, r), C (r, r). Similarly, based on a square quadrilateral (square) with a rotation angle of 90°, we derive a tetragonal prism, a tetragonal pyramid, and a tetragonal dipyramid. The angle of rotation of a regular hexagon is 60°, and the regular hexagonal prism, regular hexagonal pyramid, and regular hexagonal dipyramid are derived.

Conversion of a compound regular polygon
A compound regular polygon is a combination of 2 regular polygons of different side lengths, and the difference between the rotation angles of the 2 regular polygons is half the rotation angle. The vertices of a compound regular polygon are solved as follows: Taking a compound triangle as an example. As shown in Fig. 11, the vertices of the triangle are A, B, and C, the center of the circle is O, and the midpoint of AC is O 1 . If we set r 1 = OA 1 and r = OA, then the range of values of r 1 is (0.5r, r).
2 regular hexagons with different side lengths are transformed into the dihexagonal prism, the dihexagonal pyramid, and the dihexagonal dipyramid.

Geometric rotation for crystal form transformation
In order to form a new geometric body, there are 2 geometric bodies can be rotated at a particular angle; for instance, a trigonal trapezohedron, tetragonal trapezohedron, or hexagonal trapezohedron. A trigonal trapezohedron consists of 2 mirrored structures arranged in a trigonal pyramid rotated relative to each other at a particular angle. The vertexes of a trigonal trapezohedron comprise the intersection of the edges of the trigonal pyramid and the opposite plane and the vertices of the trigonal pyramid (Fig. 12). If the height of the trigonal pyramid is h and the radius of rotation of the bottom crosscut is r, then the length of both OD and OD 1 is h, and the length of both OA and OA 1 is r. The coordinates of vertex D are (0, 0, h), the coordinates of vertex D 1 are (0, 0, − h), vertice A is (r, 0, 0), vertice B is (r, r, 0), and vertice A 1 is (rcos(α), rsin(α), 0).
Vertices D, A, B, and A 1 in the trigonal trapezohedron are coplanar, and according to the above-mentioned plane equation, the plane equation for DAB is The linear (two-point) equation for D 1 A 1 is The intersection of the DAB plane and the line of D 1 A 1 is A 1 , with the solution a s( 2rcos − h ). The other vertices are solved in the same way.

Center-line extension
A cube is a solid figure composed of 6 squares of the same size, hence it is also termed a regular hexahedron. The tetrahexahedron, rhomb-dodecahedron, pyritohedron, and diploid can be derived from the cube. The tetrahexahedron and rhomb-dodecahedron can be originated from the cube by the method of plane-center extension.
It is the unique transformation process from cube to pyritohedron (Fig. 13). The center line of the cube plane is divided into 3 segments, with the middle segment being outwards so as to add 2 points to each surface on the basis of the original 8 vertices of the cube, adding 12 vertices in total. Here, the center line of the cube plane refers to the line connecting 2 opposite midpoints of the crystal edge, and the adjacent center line cannot be parallel. Simultaneously, If the cube edge length is set as 2r, OOx = a, QOz = b, and TA 1 = c, then we have OOz = a and A 1 P = r. In a pyritohedron, Q, A 1 , and Ox are coplanar, and triangles QTA 1 and A 1 POx are similar triangles, resulting from the relationship of similar triangles: Put the above values into this formula, yields c = (a − r) (a − r)/r. From b = r -c, we obtain b = r − (a − r) (a − r)/r. Accordingly, the coordinates of vertex Q of the pyritohedron are (b, 0, a). In the same way, the coordinates of the other vertices can be obtained.

Other geometric transformations subsection
In the parallelogram subclass (pedions, dihedrons, and parallelohedrons), the lower crystal family is simple and involves only translational geometric transformations, which are not described here.

WebGL technology
With the advent of WebGL (short for Web Graphics Library) technology, it is potential to run large and complicated 3D graphics applications on web browsers. On the basis of OpenGL ES 2.0 (a subset of the OpenGL 3D Graphics API), it is the WebGL, as one of 3D drawing protocols, which was designed for embedded devices such as mobile phones and tablet computers. On top of that, the browser kernel attains the ability to call 3D through JavaScript by encapsulating OpenGL API. Besides, the WebGL technology enables the browser to render 3D images without downloading other plug-ins, and the three-.js engine that encapsulates some of the underlying API graphics interfaces of WebGL makes it possible to create 3D models efficiently on web pages, together with good compatibility and strong cross-platform. Under the previous research, it is obvious that WebGL technology could be widely utilized in virtual display and visualization of products in many fields such as architecture, medicine, meteorology, core 3D reconstruction, digital exhibition hall, teaching, etc., to further build corresponding front-end graphics applications, which greatly satisfies the fundamental need of display for some 3D scenes and model products (Congote et al. 2011;Weiguo and Fanfei 2018;Hao et al. 2015;Zhiyang and Fei 2016). What's more, WebGL technology offers a new idea for the construction of 3D crystal model, which makes it possible to develop an online interactive 3D crystallography research system on the browser, so as to build a wisdom learning and application environment, and build an intuitive and visual platform for online learning and communication, which ultimately serve for mineral crystal researchers, mainly bracketed by geological beginners, rock and mineral appraisers and gem appraisers.

Modeling process
In general, there are three steps to construction of the 3D model of crystal geometric form (Fig. 14): The first step is about the theoretical research. Specifically, according to the geometric transformation of form, as mentioned above, it is a new-constructed classification system, revealing that the geometric form in each class of the system has particular The second is to set up background service, so as to build a 3D model of geometric form. It should be noted that it is not only necessary to determine the vertex coordinates, but also the edges and faces during the modeling process. For effective explanation, this study subsequently takes some crystal forms as examples. For the cube, it has 8 vertices, 12 edges and 6 faces, equivalent to 12 triangular faces. a, all the faces are represented by triangles in WebGL, with the normal direction to be specified. However, for complex form such as pentagonal dodecahedron with 20 vertices, 30 edges, 12 faces (36 triangular faces)], and the calculation process is more complicated than that of the former. In total, there are 52 completed algorithms to determine the vertex coordinates of the crystal form, with 47 types of geometric form and 5 types of form with left-right difference (pentagonal tritetrahedron, pentagonal trisoctahedron, trigonal trapezohedron, tetragonal trapezohedron and hexagonal trapezohedron).
In terms of crystallographic research, the automorphism determines that all crystals have the characteristics of convex geometric polyhedron shape, whose behavior is governed by Euler's laws. By solving the crystal form vertices, Quick Hull algorithm is therefore produced to calculate the edges and triangular surfaces of the convex geometric polyhedron, and finally obtain the 3D model of each crystal form. Thus, it is a pretty complicated task to construct edges from vertices and then triangular surfaces in the 3D space.
Based on Service stack of open-source Webservice framework, we build an efficient crystallography 3D online system application server, and subsequently realize the functions such as authority authentication and system module management, etc., aiming to provide online application services, such as crystal geometry form query, crystal form vertex coordinate calculation, crystal form 3D model data generation, etc.
The last step is to create the front-end system and develop the online interactive 3D environment for crystallography research. With HTML5 criterion, 3D crystallography online application system is invented in browser by the open source three js, WebGL third-party library. On the fundamental of that system, a series of functional modules have been designed, bracketed by the crystal form online search, the 3D crystal form online display, online interactive model, etc. Besides, an online 3D visualization application system for crystal form model is developed in browser by WebGL technique, throughout the online application across Windows, Android, Apple and other operating systems, to eventually provide an intuitive and visual platform for online learning and communication.

Model exhibition
From the above knowable by WebGL technology, it can not only construct the crystal form used in teaching, but also observe and analyze the crystal from any angle, making all kinds of geometric forms more intuitive and vivid.
There are 2 methods to facilitate the operation of the model platform. The one is to place the model code and related files on the server, and users only needs to open the link. The other is to send relevant documents for students to download. When opening the link in the file (The URL is http:// 39. 106. 24. 115: 9005/), the clear 3D visualization of the crystal form model should be exhibited on the web page, and all the form types could be selected to observe their front view, top view, side view and axis view, respectively as required (Fig. 15). Moreover, users can slide the pulley to zoom in or out by mouse, and drag the left button to rotate the three-dimensional model in all directions, so as to conduct 360° omni-directional observation. In addition, it can be seen a drop-down box on the left side of the display screen, where we can select different form to observe and manipulate (Fig. 15). In particular, for those similar and confusing monomers such as the differences between Hexatetrahedron and Tetrahexahedron, we can choose them for comparison (Fig. 15). In short, students can get familiar with the knowledge vertices of crystal form through personal operation and demonstration as soon as possible.
As for the on-line 3D model of crystal geometric form construction, its significance could be elucidated as follows: On the one hand, it can improve the shortage of teaching equipment in the college. On the other hand, it also changes the teaching and learning methods. As far as teachers are concerned, they don't have to use crystal form model in the laboratory. For students, they can readily learn crystal forms as appropriate to their own needs, thus it is convenient to identify the characteristics of crystal forms, especially for those easily confused. By this mean, students' learning attitude can be transformed from passive to active, so as to further stimulate the initiative to explore crystallography by themselves.

Computer code availability
This manuscript includes an open-source software developed under the terms of general public license and is available for finding at https:// github. com/ mrdoob/ three. js/ blob/ dev/ LICEN SE.
Crystal-Modeler is developed as a WebGL application and is available under an open source (see the Attachment code and Crystal-Modeler: a crystal structure modeling system, Supplementary Materials 1 and 2). The application can be operated at http:// 39. 106. 24. 115: 9005/. Crystal-Modeler is designed for internet explore (version 7-12). For enquiries contact wangran@chd.edu.cn.

Conclusion
Previous studies have classified 47 types of geometric form using various methods. In this paper, crystal geometric forms were classified from the perspective of 3D modeling, on which basis the following conclusions can be drawn.
1) It is the 47 types of geometric form thatcould be divided into 3 types: tetrahedron class, polygon (polyhedron) class, and cube class. Of these, the tetrahedron class includes 8 types of geometric form, the cube class includes 5 types, and the polygon (polyhedron) class includes 34 types.
2) The geometric form in each class has internal relations. The 3 classes all start from a basic form and develop a series of derived forms through geometric transformations, which depend mainly on the vertex formation of a crystal form. For example, the tetrahedron class has a tetrahedron as the basic form. Following the establishment of a 3D Cartesian coordinate system, geometric form transformation operations, including the methods of plane-center extension, edge-center extension, and three-segment rotation of the edge line, allow other crystal forms to be derived from the tetrahedron.
3) Through geometric analysis and calculation of coordinates of crystal forms, the vertex coordinates of 47 types of crystal form were determined (See in the Appendix). This study thereby provides a foundation for the generation of 3D models of crystal forms. 4) Under the previous theoretical research, by solving the vertices of the crystal form, we calculate the edges and triangular surfaces of the outer envelope convex geometry, and then acquire the 3D model of each geometric crystal form. Eventually, based on the HTML5 standard and the open-source three.js, we successfully develop a 3D crystallography online application system in the browser to realize intuitive and visual online learning and communication.

Data availability
The date that supports the findings of this study are available in the supplementary material of this article.

Competing interests
The authors declare no competing interests.