Research on Geometric Modeling Technology of Packaging Container Based on OpenGL(I)

Abstract : This paper proposes a geometric modeling technology for packaging containers based on OpenGL. In the paper, the common structures in packaging containers are divided into rotary structure, non-rotary structure and special structure. OpenGL technology is applied to different structures to study their three modeling methods and to use the three-dimensional modeling of realism texture mapping method. And gives an example. The system is based on the WINDOWS platform, developed using c++Builder.

Keywords :packing guest; OpenGL; geometric modeling

With the development of modern industry and the improvement of people’s living standards. Packaging containers are widely used. At present, the design of packaging containers in China is still basically based on traditional empirical design methods, and most of them are two-dimensional structural designs. With the development of computer technology, it provides a good foundation for the development of true 3D applications. This article applies OpenGL technology to carry out the key technology of geometric modeling of packaging containers. Summarizes the common structure of packaging containers, studies the three-dimensional modeling methods of these structures, and applies these technical methods to three-dimensional modeling, providing an effective method for the realization of interactive three-dimensional packaging containers CAD. OpenGL is a three-dimensional graphics library developed by SGI. It is an industry-standard three-dimensional computer graphics software interface. It can use different software development tools, such as VC++, BC++, etc. to develop three-dimensional graphics programs. It has been widely used in analog simulation, 3D graphic image processing, animation, and the growing development of virtual reality technology.

1 Packaging Container Rotary Structure Modeling Method

The common structure in the packaging container is a rotating body structure, such as a variety of glass containers, etc. This part of the structure can be achieved with a cylindrical/cone gluCylinder(), that is, the structuring of the rotating body is divided into many small cylinders/cones, and they are connected to each other to form a revolution. Body structure of the packaging container. For example, the round bottle can be decomposed into four revolution structures such as bottle mouth, bottle neck and bottle shoulder, bottle body and bottle bottom. Due to the irregular shape of the glass bottle from the bottle mouth to the bottom of the bottle, it can be decomposed into a number of regular shapes, ie, cylindrical/conical. Different formulas are used to calculate the diameter of different parts of the bottle, for example, for cylindrical glass bottles. According to the height of 5-12 ram decomposition calculations. The formula is:


2 Non-rotary structure modeling method for packaging containers

one Some packaging containers exhibit non-rotary structures, with curved surfaces and flat surfaces. OpenGL has a bit of geometry, lines, and polygons. The line is three-dimensional and is defined by a series of connected vertices. The polygon consists of closed line segments. By selecting attributes, you can obtain both the filled polygon and the outline. Three-dimensional modeling can use a series of connected closed plane polygons to express smooth curves and surfaces. Therefore, a non-revolving structural container can be decomposed into a certain number of polygonal surfaces, and these surfaces are formed into corresponding curved surfaces according to their relative positions. As shown in Fig. 2, the packaging container is composed of 2 curved surfaces and 2 flat surfaces, wherein the curved surface is composed of 11 quadrilaterals. It should be noted that the OpenGL polygon is a convex polygon.