Research on the Procedure for Computer-Aided Pattern Design of Uygur ' s Flowered Hats

Xinjiang Uygur’s flowered hats is famous all over the world, it leads the world of headwear of variou nationalities within China by the variety of styles, the various ways of how to emroider pattern design and exquisite manufacture. It is unusual even in national costumes art of the world. The poupose of this study is to analyze Uygur's headwear, study the rules of Uygur's headwear pattern, analyze the characteristic of the basic pattern, research on the procedure for computer-aided pattern design of Uygur's flowered hat, explore the application of computer-aided design in traditional costume's pattern design and to realize application exploration of computeraided design in designing of costume and dress adornment.


INTRODUCTION
In the model of flowered hats, there are generally several types: quatrefoil (it is sewed with four piece of triangle materials), hat of five sides, goblets of hat, white and embroidered hat, white and geometric pattern hat, color cloth embroidered hat of dichromatism or four colors and high flowered hat etc.There are several types of flowered hats' pattern: layout with poppy head composed by four symmetric rotundities, ellipses, square nesses, long triangles and anomalous formations and the edge is four rectangles design; layout with four symmetric poppy head of rotary pattern and the edge is three series pattern; layout with arranged regularly points and spread; layout with cross symmetry, each piece has framework of cross and plan pattern according to Tian-shaped, M-shaped or square; layout with circular poppy head and the edge is multilayer and different width of two series pattern; and layout with five group pattern as edge's pattern (Luo, 1998).The pattern of flowered hats has plant veins, such as megranate flower, peach blossom, apricot flower, chrysanthemum, peony, cotton, grape, fig, calliopsis, rose, lotus and so on; veins of natural phenomenon, for example, the hosts of heaven, snowflake; veins of animal, such as butterfly, fish; and all kinds of geometric pattern (Wu, 2009).As a part of cultural heritage, traditional manual pattern design contains deep root of traditional culture, keeps the nature state of the national culture and the peculiar modes of their thought and it has very high values in taste, culture and application (Kaplan and Salesin, 2004).With the increasing recognition of protection of traditional cultural heritage all the countries in the world, the protecation of traditional manual pattern design, especially research of the digit model has drawn more and more attention (Karam and Nakajing, 1999;Cai et al., 2009).
In this study, we analyze Uygur's headwear, study the rules of Uygur's headwear pattern, analyze the characteristic of the basic pattern, research on the procedure for computer-aided pattern design of Uygur's flowered hat and explore the application of compueraided design in traditional costume's pattern design and to realize application exploration of compuer-aided design in designing of costume and dress adornment.

BÉZIER CURVES
A Bézier curve is a parametric curve frequently used in computer graphics and related fields.Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.In vector graphics, Bézier curves are used to model smooth curves that can be scaled indefinitely."Paths," as they are commonly referred to in image manipulation programs, are combinations of linked Bézier curves.Paths are not bound by the limits of rasterized images and are intuitive to modify.Bézier curves are also used in animation as a tool to control motion.Bézier curves are also used in the time domain, particularly in animation and interface design, e.g., a Bézier curve can be used to specify the velocity over time of an object such as an icon moving from A to B, rather than simply moving at a fixed number of pixels per step.When animators or interface designers talk about the "physics" or "feel" of an operation, they may Bézier curves were widely publicized in 1962 by the French engineer Pierre Bézier, who used them to design automobile bodies.But the study of these curves was first developed in 1959 by mathematician Paul de Casteljau using de Casteljau's algorithm, a numerically stable method to evaluate Bézier curves.
The realization of computer-aided pattern design of Uygur's headwear by use of de Casteljau's algorithm in this study.
If P 0 , P 0 2 , P 2 are three different points on the parabola, two tangents through point P 0 and point P 2 cut at point P 1 , the tangent through point P 0 2 cut line P 0 P 1 at point P 0 1 and cut line P 2 P 1 at point P 1 1 and as follows proportion come into existence: It is imported a parameter t when point P 0 and point P 2 are fixed and let above ratio is t:(1-t), that is: t varies from 0 to 1, the first and second formula separately shows the first and second side which controls the two side shape, they are called linear Bézier curves.And let the first and second formula in the third formula, it can be written as: t varies from 0 to 1, it is quadratic Bézier curve, which is the path traced by the points P 0 , P 1 and P 2 .And it can be interpreted as the linear interpolant of corresponding points on the linear Bézier curves from P 0 to P 1 and from P 1 to P 2 respectively.Bézier curves can be defined for any degree n.A recuresive definition for the Bézier curve of degree n expresses it as a point-topoint linear combination of a pair of corresponding points in two Bézier curves of degree n-1.
The recuresive compute formula for Bézier curve can be written as: It is De Casteljau's algorithm.

STORAGE FORMAT OF PATTERNS
The BMP file format, also known as bitmap image file or Device Independent Bitmap (DIB) file format or simply a bitmap, is a raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems.
The BMP file format is capable of storing 2D digital images of arbitrary width, height and resolution, both monochrome and color, in various color depths and optionally with data compression, alpha channels and color profiles.
The bitmap image file consists of three parts or four parts, due to the situation.In this study, BMP file = Bitmap File Header+ DIB Header+Color Table+Pixel Array.
Bitmap File Header is to store general information about the Bitmap Image File, DIB Header is to store detailed information about the bitmap image and define the pixel format, Color Table is to define colors used by the bitmap image data (Pixel Array) and Pixel Array is to define actual values of the pixels.

Bitmap file header:
This block of bytes is at the start of the file and is used to identify the file.A typical application reads this block first to ensure that the file is actually a BMP file and that it is not damaged.typedef struct tagBITMAPFILEHEADER { WORD bfType; DWORD bfSize; WORD bfReserved1; WORD bfReserved2; DWORD bfOffBits; } BITMAPFILEHEADER; The first two bytes of the BMP file format are the character 'B' then the character 'M' in 1-byte ASCII encoding.All of the integer values are stored in littleendian format (i.e., least-significant byte first).
DIB header: This block of bytes tells the application detailed information about the image, which will be used to display the image on the screen.The block also matches the header used internally by Windows and OS/2 and has several different variants.All of them contain a dword (32 bit) field, specifying their size, so that an application can easily determine which header is used in the image: listing the colors used by the image.Each pixel in an indexed color image is described by a number of bits (1, 4, or 8) which is an index of a single color described by this table.The purpose of the color palette in indexed color bitmaps is to inform the application about the actual color that each of these index values corresponds to.The purpose of the color table in non-indexed (nonpalettized) bitmaps is to list the colors used by the bitmap for the purposes of optimization on devices with limited color display capability and to facilitate future conversion to different pixel formats and paletization.
The color table is normally not used when the pixels are in the 16-bit per pixel (16 bpp) format (and higher); there are normally no color table entries in those bitmap image files.However, the Microsoft documentation (on the MSDN web site as of Nov. 16, 2010) specifies that for 16 bpp (and higher), the color table can be present to store a list of colors intended for optimization on devices with limited color display capability, while it also specifies, that in such cases, no indexed palette entries are present in this Color Table .This may seem like a contradiction if no distinction is made between the mandatory palette entries and the optional color list.
typedef struct tagRGBQUAD { BYTE rgbBlue; BYTE rgbGreen; BYTE rgbRed; BYTE rgbReserved; } RGBQUAD; Pixel array: The pixel array is a block of 32-bit DWORDs that describes the image pixel by pixel.Normally pixels are stored "upside-down" with respect to normal image raster scan order, starting in the lower left corner, going from left to right and then row by row from the bottom to the top of the image.
Padding bytes (not necessarily 0) must be appended to the end of the rows in order to bring up the length of the rows to a multiple of four bytes.When the pixel array is loaded into memory, each row must begin at a

THE PROCEDURE OF DRAWING PATTERN
The pattern of flowered hats is a combination of some basic patterns and the basic pattern is composed of clearly delineated lines.
Based on rules of flowered hats' pattern, several questions that are needed to consider during the realization of drawing: how to store pattern, whole pattern or analysis to draw, how to get the whole pattern by drawing of analysis and so on.Because the patterns mostly are symmetric, each complicated design may be regard as synthesis of some basic patterns, basic patterns are composed of smooth curves and curves make of many points.But the workload drawing every points to paint the curve is very great.
The procedure of this study is: first, to analyze the original pattern, get the basic designs and draw the basic patterns separately, second, to analyze the basic patterns, get curves and draw the curves by algorithm of Bézier curves, third, to synthesize basic designs with curves by algorithms of mirror, rotation and synthesis, finally, to synthesize the whole pattern with basic designs.To summarize the point is to realize the drawing by "analysis-synthesis, drawing of curves by points, drawing of designs by curves and drawing of patterns by designs".
It is the procedure of drawing the basic pattern that showed in Fig. 2.
The procedure of drawing designs in this study can be summarized: decomposition drawing composition and in the treating process that is embody the method of drawing curves by points and drawing

STRUCTURE DESIGN OF THE SYSTEM
The structure of system: The functions of the system that will be realized by this study mainly consist of patterns' drawing, show of patterns, print of patterns, save of patterns and import of patterns which have been drawn.It is to draw the pattern with above procedure, that is to say, to draw the design by drawing of the basic patterns, use mirror algorithm or rotation algorithm to realize the patterns change and composition algorithm.
It is the structure of system to drawing the design that showed in Fig. 4.
Interface structure: It is the interface of drawing patterns that showed in Fig. 5.
The left side is the pane of dermatoglyphic pattern titles and the right side is the pane to show patterns.
It is adopt Windows operation system and use Visual C++ as development tool to realize the interface in this study.

CONCLUSION
It introduces the rules of Uygur's headwear pattern, provides a procedure of drawing by "analysis-synthesis, drawing of curves by points, drawing of designs by curves and drawing of patterns by designs" and gives the structure of system and interface.
In the next step, the research focuses on algrithm design about mirror, rotation and composition.It needs to prove the procedure that draw Uygur's flowered hats' pattern by Bézier curves is feasible.

Fig. 1 :
Fig. 1: Bezier curve be referring to the particular Bézier curve used to control the velocity over time of the move in question.Bézier curves were widely publicized in 1962 by the French engineer Pierre Bézier, who used them to design automobile bodies.But the study of these curves was first developed in 1959 by mathematician Paul de Casteljau using de Casteljau's algorithm, a numerically stable method to evaluate Bézier curves.The realization of computer-aided pattern design of Uygur's headwear by use of de Casteljau's algorithm in this study.If P 0 , P 0 2 , P 2 are three different points on the parabola, two tangents through point P 0 and point P 2 cut at point P 1 , the tangent through point P 0 2 cut line P 0 P 1 at point P 0 1 and cut line P 2 P 1 at point P 1 1 and as follows proportion come into existence: It is called three tangent theorem of parabola.Such as "Fig.1" is a Bézier curve.

Fig. 2 :
Fig. 2: The procedure of drawing the basic pattern

Fig. 4 :
Fig. 4: The structure of system Color table:The color table is a block of bytes (a table)