A pattern, from the French patron, is a type of theme of recurring events or objects, sometimes referred to as elements of a set. These elements repeat in a predictable manner. It can be a template or model which can be used to generate things or parts of a thing, especially if the things that are created have enough in common for the underlying pattern to be inferred, in which case the things are said to exhibit the unique pattern. Pattern matching is the act of checking for the presence of the constituents of a pattern, whereas the detecting for underlying patterns is referred to as pattern recognition. The question of how a pattern emerges is accomplished through the work of the scientific field of pattern formation.
The most basic patterns are based on repetition and periodicity. A single template, or cell, is combined with duplicates without change or modification. For example, simple harmonic oscillators produce repeated patterns of movement.
Pattern recognition is more complex when templates are used to generate variants. For example, in English, sentences often follow the "NVP" (noun  verb phrase) pattern, but some knowledge of the English language is required to detect the pattern. Computer science, ethology, and psychology are fields which study patterns.
Contents 
Patterns may be directly observed with any of our five senses.
Visual patterns are very common such as simple decorative patterns (stripes, zigzags, and polkadots). Others can be more complicated, however, they may be found anywhere in nature and in art.
A recurring pattern in a piece of art is referred to as a motif.
The golden ratio (approximately 1.618) is found frequently in nature. It is defined by two numbers, that form a ratio such that (a+b)/a = a/b (a/b being the golden ratio). This pattern was exploited by Leonardo da Vinci in his art. The golden ratio can be seen in nature, from the spirals of flowers to the symmetry of the human body (as expressed in Da Vinci's Vitruvian Man, one of pi3.1415976use fibbonaci sequence to find pattern in floral blossoming and reproduced works of art today. This is still used by many artists).
Patterns of abstraction may not be directly observable such as patterns in mathematics.
Mathematics is commonly described as the "Science of Pattern." Any sequence of numbers that may be modeled by a mathematical function is considered a pattern.
In Pattern theory, mathematicians attempt to describe the world in terms of patterns. The goal is to lay out the world in a more computationally friendly manner.
Patterns are common in many areas of mathematics. Recurring decimals are one example. These are repeating sequences of digits which repeat infinitely. For example, 1 divided by 81 will result in the answer 0.012345679... the numbers 09 (except 8) will repeat forever — 1/81 is a recurring decimal.
Fractals are mathematical patterns that are scale invariant. This means that the shape of the pattern does not depend on how closely you look at it. Selfsimilarity is found in fractals. Examples of natural fractals are coast lines and tree shapes, which repeat their shape regardless of what magnification you view at. While the outer appearance of selfsimilar patterns can be quite complex, the rules needed to describe or produce their formation can be extremely simple (e.g. Lindenmayer systems for the description of tree shapes).
In computer science, complex mathematical models may be designed to create more complex patterns. Patterns may be found in every branch of computer science.
An important use of patterns in computer science is the idea of Design patterns. Design patterns are general solutions to problems in objectoriented programming. They will not solve a specific problem, but they provide a sort of architectural outline that may be reused in order to speed up the development process of a program. Design patterns have provided the stepping stone for computer science to truly enter the engineering field.
In geology, a mineral's crystal structure is composed of a recurring pattern. In fact, this is one of the 5 requirements of a mineral. Minerals must have a fixed chemical composition in a repeating arrangement, such as a crystal matrix. For a 2dimensional crystal structure, there are 10 different planar lattices possible. Moving up to 3 dimensions, 32 patterns are possible. These are called bravais lattices.
