Approach to Representation of Type-2 Fuzzy Sets Using Computational Methods of Computer Graphics

type-2 fuzzy sets in 3D surfaces that are discretized into triangular faces with planar equations. Size of triangle is difference depending on slope of the surface. Authors proposed practical algorithms to implement operations on type-2 fuzzy sets by designing computational geometry algorithms on TIN. The result is shown and corroborated for robustness of the approach, rendering type-2 fuzzy sets in 3-D environment using OpenSceneGraph SDK.


Introduction
The type-2 fuzzy sets was introduced by L. Zadeh as an extension of ordinary fuzzy sets.So the concept of type-2 fuzzy sets is also extended from type-1 fuzzy sets.If A is a type-1 fuzzy set and membership grade of x ∈ X in A is µ A (x), which is a crisp number in [0,1].A type-2 fuzzy set in X is Ã, and the membership grade of x ∈ X in Ã is µ Ã (x), which is a type-1 fuzzy set in [0,1].The elements of the domain of µ Ã (x) are called primary memberships of x in Ã and the memberships of the primary memberships in µ Ã (x) are called secondary memberships of x in Ã.
Recently, there are many researches and applications related to type-2 fuzzy sets because of the advancing in uncertainty management.Karnik et al (2001A) proposed practical algorithms of operations on type-2 fuzzy sets as union, intersection, complement.Karnik et al (2001B) proposed the method of type-reduction of type-2 fuzzy sets based on centroid defuzzification.Mendel et al (2002) have developed new representation of type-2 fuzzy sets based on embedded type-2 fuzzy sets.This representation easily have designing of type-2 fuzzy logic system is easy to use and understand.Mendel (2004), Liu (2008) proposed some practical algorithms in implementing and storing data to speed-up the computing rate of type-2 fuzzy logic systems.Coupland et al (2007), Coupland et al (2008A), Coupland et al (2008B) proposed representation type-1 and interval type-2 fuzzy sets and fuzzy logic system by using computational geometry, the fast approach to geometric defuzzification of type-2 fuzzy sets, the approach is better in computing than analytic approaches.TIN is a method of representation of curved surface in 3D space for many applications in computer graphics and simulation.Many approaches Shewchuck (2002), Ruppert (1997), Chew (1989) are use to generate TIN from set of points based Delaunay algorithms.
The chapter deals with the new representation of type-2 fuzzy sets using TIN.The membership grades of type-2 fuzzy sets in 3D surfaces that are discretized into triangular faces with planar equations.Size of triangle is difference depending on slope of the surface.Authors proposed practical algorithms to implement operations on type-2 fuzzy sets by designing computational geometry algorithms on TIN.The result is shown and corroborated for robustness of the approach, rendering type-2 fuzzy sets in 3-D environment using OpenSceneGraph SDK.
The chapter is organized as follows: II presents TIN and geometric computation; III introduces type-2 fuzzy sets; IV presents approximate representation of type-2 fuzzy sets; V is operations of TIN and geometric operations of type-2 fuzzy sets; VI is conclusion and future works.

TIN and geometric computation
where f i s (i = 1, ..., k) are planar equations.

Fig. 1. A Delaunay Triangulation
The Delaunay triangulation of a set V of points in IR 2 is a subdivision of the convex hull of V into triangles that their vertices are at points of V, and such that triangles are as much equiangular as possible.More formally, a triangulation τ of V is a Delaunay triangulation if and only if, for any triangle t of τ, the circumcircle of t does not contain any point of V in its interior.This property is called the empty circle property of the Delaunay triangulation.Let u and v be two vertices of V.The edge uv is in D if and only if there exists an empty circle that passes through u and v.An edge satisfying this property is said to be Delaunay.The geometric dual of the Delaunay triangulations is the Voronoi diagram, which describes the proximity relationship among the point of the given set V. The Voronoi diagram of a set V of points is a subdivision of the plane into convex polygonal regions, where each region is associated with a point P i of V.The region associated with P i is called Voronoi region of P i , and consists of the locus of points of the plane which lie closer to P i than any other point in V.T wo points P i and P j are said to be Voronoi neighbours when the corresponding Voronoi regions are adjacent.Figure 2 shows the Delaunay triangulation and the Voronoi diagram from a point set.
The usual input for two-dimensional mesh generation is not merely a set of vertices.Most theoretical treatments of meshing take as their input a planar straight line graph (PSLG).A PSLG is a set of vertices and segments that satisfies two constraints.First, for each segment contained in a PSLG, the PSLG must also contain the two vertices that serve as endpoints for that segment.Second, segments are permitted to intersect only at their endpoints.A set of segments that does not satisfy this condition can be converted into a set of segments that does.Run a segment intersection algorithm, then divide each segment into smaller segments at the points where it intersects other segments.
The constrained Delaunay triangulation (CDT) of a PSLG X is similar to the Delaunay triangulation, but every input segment appears as an edge of the triangulation.An edge or triangle is said to be constrained Delaunay if it satisfies the following two conditions.First, its vertices are visible to each other.Here, visibility is deemed to be obstructed if a segment of X lies between two vertices.Second, there exists a circle that passes through the vertices of the edge or triangle in question, and the circle contains no vertices of X that are visible from the interior of the edge or triangle.
The flip algorithm begins with an arbitrary triangulation, and searches for an edge that is not locally Delaunay.All edges on the boundary of the triangulation are considered to be locally Delaunay.For any edge e not on the boundary, the condition of being locally Delaunay is similar to the condition of being Delaunay, but only the two triangles that contain e are considered.For instance, Figure 4 demonstrates two different ways to triangulate a subset of  Whenever the flip algorithm identifies an edge that is not locally Delaunay, the edge is flipped.
To flip an edge is to delete it, thereby combining the two containing triangles into a single containing quadrilateral, and then to insert the crossing edge of the quadrilateral.Hence, an edge flip could convert the triangulation at left in Figure 4 into the triangulation at right, or vice versa.

Half edge data structure and basic operations
A common way to represent a polygon mesh is a shared list of vertices and a list of faces storing pointers for its vertices.The half-edge data structure is a slightly more sophisticated boundary representations which allows all of the queries listed above to be performed in constant time.In addition, even though we are including adjacency information in the faces, vertices and edges, their size remains fixed as well as reasonably compact.
The half-edge data structure is called that because instead of storing the edges of the mesh, storing half-edges.As the name implies, a half-edge is a half of an edge and is constructed by splitting an edge down its length.Half-edges are directed and the two edges of a pair have opposite directions.Data structure of each vertex v in TIN contains a clockwise ordered list of half edges gone out from v. Each half edge h =( eV, lF) contains end vertex (eV) and index of right face (lF).Suppose that a TIN has m faces and n vertices, it needs to have n lists of 3m half edges and memory is n * (3 * m) * (2 * 4) bytes.Figure 5 shows data structure of vertex v with 6 half-edges indexed from 0 to 5, the i th half-edge contains the vertex v i and the right face f i of the edge.Output:The new list of half edge of vertex v.
1. Identity i in the list of half edges of v so that the ray (v, eP) is between two rays (v, v i ) and (v, v i+1 ).
2. Move k − i half edges from position i to i + 1 in the list.
3. Insert the half edge h into position i.
Figure 6 depicts an example of edge collapse operation after deleting the edge (v 0 , v 1 ) from V. The first step of edge collapse is to identity indices i 0 , i 1 of half edges h 0 , h 1 in the lists of half edges of v 0 , v 1 , respectively.Then moving half edges (v 1 , v 4 ), (v 1 , v 5 ) of vertex v 1 into the list of v 0 at i 0 , rejecting half edges h 0 , (v 3 , v 1 ), (v 6 , v 1 ), setting the endpoint of half edges (v 4 , v 1 ), (v 5 , v 1 ) to be v 0 .The following is the algorithm for edge collapse: Algorithm 2.2 (Edge Collapse).Remove the edge (v 0 , v 1 ) and vertex v 1 from TIN.
Output: TIN T ′ is the collapsed TIN.
1. Identity i 0 , i 1 of half edges h 0 , h 1 in lists of v 0 , v 1 , respectively.
2. Copy half edges of v 1 from position i + 2 to i − 2 (if exist) in the list to the list of half edges of v 0 at i 0 .Then set endpoint of respective inverse half edges is v 0 .
3. Delete half edges from position i − 1 to i + 1 of v 1 and their inverse half edges.
Output: TIN T ′ is the flipped TIN.
2. Move half edges h 0 ,h 1 of vertices v 0 ,v 1 to vertices v 2 ,v 3 and their endpoints are v 3 ,v 2 , respectively.
3. Change right face of half edges (v 0 , v 3 ), (v 1 , v 2 ).A fuzzy set F in U may be represented as a set of ordered pairs of a generic element x and its grade of membership function: x, in which the integral sign denotes the collection of all points x ∈ U with associated membership function µ F (x).When U is discrete, F is re-written as F = ∑ U µ F (x)/x, in which the summation sign denotes the collection of all points x ∈ U with associated membership function µ F (x).
In the same crisp theoretic set, basic operations of fuzzy set are union, intersection and complement.These operations are defined in term of their membership functions.Let fuzzy sets A and B be described by their membership functions µ A (x) and µ B (x).One definition of fuzzy union leads to the membership function where ∨ is a t-conorm, for example, maximum.
and one definition of fuzzy intersection leads to the membership function where ⋆ is a t-norm, for example minimum or product.
The membership function for fuzzy complement is Fuzzy Relations represent a degree of presence or absence of association, interaction, or interconnectedness between the element of two or more fuzzy sets.Let U and V be two universes of discourse.A fuzzy relation, R(U, V) is a fuzzy set in the product space U × V, i.e, it is a fuzzy subset of U × V and is characterized by membership function µ R (x, y) where Let R and S be two fuzzy relations in the same product space U × V.The intersection and union of R and S, which are compositions of the two relations, are then defined as where ⋆ is a any t-norm and • is a any t-conorm.
Sup-star composition of R and S:

Type-2 fuzzy sets
A type-2 fuzzy set in X is denoted Ã, and its membership grade of x ∈ X is µ Ã(x, u), u ∈ J x ⊆ [0, 1], which is a type-1 fuzzy set in [0, 1].The elements of domain of µ Ã (x, u) are called primary memberships of x in Ã and memberships of primary memberships in µ Ã(x, u) are called secondary memberships of x in Ã.
In manner of embedded fuzzy sets, a type-2 fuzzy sets Mendel et al ( 2002) is union of its type-2 embedded sets, i.e where n ≡ N ∏ i=1 M i and Ãj e denoted the j th type-2 embedded set of Ã, i.e., where u j i ∈{u ik , k = 1, ..., M i }.Let Ã, B be type-2 fuzzy sets whose secondary membership grades are f x (u), g x (w), respectively.Theoretic operations of type-2 fuzzy sets such as union, intersection and complement are described Karnik et al (2001A) as follows: where ∨, ⋆ are t-cornorm, t-norm, respectively.Type-2 fuzzy sets are called an interval type-2 fuzzy sets if the secondary membership function f x ′ (u)=1 ∀u ∈ J x i.e. a type-2 fuzzy set are defined as follows: Definition 3.2.An interval type-2 fuzzy set Ã is characterized by an interval type-2 membership function µ Ã (x, u)=1 where x ∈ X and u ∈ J x ⊆ [0, 1], i.e.,

Approximate representation of type-2 fuzzy sets
Extending the concept of interval type-2 sets of upper MF and lower MF, we define a membership grade of type-2 fuzzy sets by dividing them into subsets: upper (lower) surface and normal surface as follows: Definition 4.1 (Upper surface).ÃUS is called a upper surface of type-2 fuzzy set Ã and defined as follows: in which J + x ⊆ [u + x ,1] and u + x = sup{u|µ Ã(x, u)=1}.Definition 4.2 (Lower surface).ÃLS is called lower surface of type-2 fuzzy set Ã and defined as follows: ÃNS is called a normal surface of type-2 fuzzy set Ã and defined as follows: For this reason, a type-2 fuzzy set Ã is union of above defined sub-sets, i.e.Ã = ÃUS ∪ ÃNS ∪ ÃLS .Figure 8 is an example of type-2 fuzzy set that is union of subsets: upper surface, normal surface and lower surface.A proximate representation of type-2 fuzzy sets is proposed by using a TIN that be able to approximately represent the 3-D membership function, is expressed as the following theorem.
Theorem 4.1 (Approximation Theorem).Let Ã be type-2 fuzzy set with membership grade µ Ã (x, u) in continuous domain D. There exists a type-2 fuzzy set with membership grade is a TIN T Ã, denoted ÃT , so that ÃT is ǫ-approximation set of Ã, i.e, Proof.If Ã has membership grade consisting a set of patches of continuous linear surfaces (example of its membership grades are made by only using triangular and trapezoid membership grades), then TIN ÃT is created as follows: 1. Set V is the set of vertices of membership grades of Ã.
2. Set E is the set of edges of membership grades of Ã.
3 .C a l lX=( V ,E )i saplanar straight line graph (PSLG).Make a TIN A T is the constrained Delaunay triangulation from X. ÃT is a type-2 fuzzy set with membership function A T .
Observe that A T represents faithfully the membership grade of Ã.
If Ã has membership grade consisting only one continuous non-linear surfaces.
A T is modified by inserting new vertex (x k , u k ) as the following steps: 1. Find the triangle T j of A T , in which (x k , u k ) ∈ T j .
2. Partition the T j into sub-triangles depending on the position of (x k , u k ) on T j .+If(x k , u k ) lies on edge e k of T j , e k is the adjacent edge of T j and T k .Partitioning T j , T k into four sub-triangles as Figure 9a.+If(x k , u k ) is in T j .Partitioning T j into three sub-triangles as Figure 9b.
3. Verify new triangles that meet the constrained Delaunay triangulation.This operation may re-arrange triangles by using flip operation for two adjacent triangles.The algorithm results in that T j is divided into smaller sub-triangles.So we could find triangle T * of TIN A * T , is modified TIN of A T after N k steps, so that T * is small enough and contains (x k , u k ).The continuity of the membership grade of Ã shows that We prove the theorem in the case that membership grade of Ã is set of patches of continuous linear and non-linear surfaces.Suppose that its membership grade involves N patches of discrete continuous linear surfaces and M patches of discrete continuous linear surfaces, S 1 , S 2 , ..., S M .N patches of continuous linear surfaces, that are represented by a TN * T ,i s proven above section.According to above proof, each continuous non-linear surface  The section introduces some algorithms operating on TIN such as: intersection of two TINs, minimum or maximum of two TINs.Algorithm on intersection is to create a poly-line that is intersection and break-line of TINs.Algorithm on maximum/minimum is to generate new TIN T 0 from two TINs T 1 , T 2 satisfying ∀(x, u)|µ T 0 (x, u)=min(µ T 1 (x, u), µ T 2 (x, u)) or µ T 0 (x, u)=max(µ T 1 (x, u), µ T 2 (x, u)).The following is the detailed descriptions of algorithms.
Outputs: Modified T 1 , T 2 are with some new vertices and edges on intersection poly-lines.
2. Find v * k (k = 1, .., M) are the intersection points of L 1 , L 2 .3. If M = 0 or set of intersection points is empty then return.Theoretic join operation is described as follows.For every pair of points {u, w}, such that u ∈ F ⊆ [0, 1] of Ã and w ∈ G ⊆ [0, 1] of B, we find the maximum of v and w and the minimum of their memberships, so that v ∨ w is an element of F ⊔ G and f x (v) ∧ g x (w) is the corresponding membership grade.If more than one {u, w} pair gives the same maximum (i.e., the same element in F ⊔ G), maximum of all the corresponding membership grades is used as the membership of this element.

For each v *
where Based-on theoretic join and meet operation, we proposed TIN-based geometric algorithm for join operation.This algorithm uses two above mentioned algorithms involving intersection and min/max.Output: C is result of join operation.
1. Find the upper surface by using the max-algorithm: 2. Find the lower surface by using the max-algorithm: T CLS = max(T ÃLS , T BLS ) 3. Generate normal surface from T CUS and T CUS using Delaunay Triangulation.
Figure 11 is two type-2 fuzzy sets that its primary MF is Gaussian MF and its secondary MF is triangular MF. Figure 12 is the result T2FS that are rendered in 3D environment.

Meet operation
Recall theoretic meet operation is described as follows: where ⋆ represents a t-norm.If µ Ã(x) and µ B(x) have discrete domains, ( 29) is rewritten as follows: In a similar way, the point u ⋆ w with the largest membership grade is kept if more than one calculation of u and w gives the same one.
For every pair of points {u, w}, such that u ∈ F ⊆ [0, 1] of Ã and w ∈ G ⊆ [0, 1] of B, we find the minimum or product of v and w and the minimum of their memberships, so that v ⋆ w is an element of F ⊓ G and f x (v) ∧ g x (w) is the corresponding membership grade.
If θ ∈ F ⊓ G, the possible {u, w} pairs that can give θ as the result of the maximum operation are {θ, u} where u ∈ [θ, ∞) and {w, θ} where w ∈ [θ, ∞).The process of finding the membership of θ in Ã ⊓ B can be broken into three steps: (1) find the minimum between the memberships of all the pairs {u, θ} such that u ∈ [θ, ∞) and then find their supremum; (2) do the same with all the pairs {θ, w} such that w ∈ [θ, ∞); and, (3) find the maximum of the two supremum, i.e., where Output: C is result of meet operation.
1. Find the upper surface by using the min-algorithm: T CUS = max(T ÃUS , T BUS ) 2. Find the lower surface by using the min-algorithm: T CLS = max(T ÃLS , T BLS ) 3. Generate normal surface from T CUS and T CUS using Delaunay Triangulation.

Negation operation
Algorithm 5.5 (Negation Operation).Input: Ã is a type-2 fuzzy set.Output is result of negation operation.
1.For each vetex v k of T US or T LS of B. We use the OSG for rendering of type-2 fuzzy sets.The approach is implemented for representation of general T2FS with various ε-approximation.Let Ã is a general type-2 fuzzy set.The feature membership functions of Ã are described as follows: FOU is Gaussian function with upper MF and lower MF as follows: Upper MF of FOU: Lower MF of FOU: 35) where m 1 = 3.0, m 2 = 4.0 and σ = 0.5.
The next feature of Ã is set of points where µ Ã (x, u)=1.0,involves points belong to the MF described as follows: f m (x)=e − 1 2 ( x−(m 1 +m 2 )/2 σ ) 2 (36) 15 Approach to Representation of Type-2 Fuzzy Sets Using Computational Methods of Computer Graphics www.intechopen.com

Conclusion
The chapter introduces the new approach to represent a type-2 fuzzy sets using triangular irregular network.TIN has used to represent 3D surfaces by partitioning domain D into sub-triangle satisfying Delaunay criteria or constrained Delaunay criteria.This representation is used for membership functions of type-2 fuzzy sets that are 3D surfaces.We also proposed approach using half-edge to operate TIN in real-time application.Based-on this result, we have developed new computation to implement operations of type-2 fuzzy sets such as join, meet, negation.These operations is the base to develop computing for type-2 fuzzy logic systems.
The next goals is to continue improving geometry algorithms decrease computational time based on GPU.The second is to apply computing for developing type-2 fuzzy logic system using geometry algorithms.

Acknowledgment
This paper is sponsored by Vietnam National Foundation for Science and Technology Development (NAFOSTED), Grant No 102.012010.12,and RFit@LQDTU, Le Quy Don Technical University, Vietnam.

2. 1
Delaunay triangulation A topographic sur f ace υ is the image of a real bivariate function f defined over a domain D in the Euclidean plane, as υ = (x, u, f (x, u)) (x, u) ∈ D (1) A polyhedral model is the image of a piecewise-linear function f that is described on a partition of D into polygonal regions {D 1 , ..., D k } and the image of f over each region D i (i = 1, ..., k) is a linear patch.If all D i s (i = 1, .., k) are triangles then the polyhedral model is called a Triangulated Irregular Network (TIN).Hence, υ may be represented approximately by a TIN, as Fig. 2. The Delaunay triangulation (solid lines) and the Voronoi diagram (dash lines) from a point set.

Fig. 3 .
Fig. 3. (a) A planar straight line graph.(b) Delaunay triangulation of the vertices of the PSLG.(c)Constrained Delaunay triangulation of the PSLG.

Fig. 4 .
Fig. 4. Two triangulations of a vertex set.At left, e is locally Delaunay; at right, e is not.fourvertices.In the triangulation at left, the edge e is locally Delaunay, because the depicted containing circle of e does not contain either of the vertices opposite e in the two triangles that contain e.In the triangulation at right, e is not locally Delaunay, because the two vertices opposite e preclude the possibility that e has an empty containing circle.Observe that if the triangles at left are part of a larger triangulation, e might not be Delaunay, because vertices may lie in the containing circle, although they lie in neither triangle.However, such vertices have no bearing on whether or not e is locally Delaunay.

Fig. 5 .
Fig. 5. List of half-edges of a vertex.Some operations are built based on half-edges such as edge collapse operation, flip operation, insertion or deletion operation...The following is description of half-edge based algorithms.Algorithm 2.1 (Insertion Operation).Insert a new half edge h into the list of vertex v. Input: The list of half edge of vertex v and new vertex eP.

Fig. 6 .
Fig. 6.Edge collapse.Flip operation mentioned above is shown in Figure 7.The algorithm is applied to the edge which does not satisfy the empty circle property of Delaunay triangulation.The following is algorithm for flip operation:
A is represented approximately by a TIN A T .S oM continuous non-linear patches, S 1 , S 2 , ..., S M are represented by M TINs S T1 , S T2 , ..., S TM .Because of the discreteness of M patches, M TINs representing patches are also discrete.For this reason, we could combine M TINs S T1 , S T2 , ..., S TM and S * T into only one TIN S T .Definition 4.4.A base-line of a TIN representing a type-2 fuzzy set is a polyline v i (i = 1, .., N) satisfying v i .u= 0 and v i v i+1 is a edge of triangle of TIN.

Figure 10
Figure 10 is the TIN that represent approximately of Gaussian type-2 fuzzy sets with ǫ = 0.1.The primary MF is a Gaussian with fixed deviation and mean m k ∈ [m 1 , m 2 ] and the secondary MF is a triangular MF.The dask-line is a base-line of TIN.

Fig
Fig. 14.Negation operation 5.5 Rendering and performance The OpenSceneGraph (OSG) [http://www.openscenegraph.org] is an open source high performance 3D graphics toolkit, used by application developers in fields such as visual simulation, games, virtual reality, scientific visualization and modelling.Written entirely in Standard C++ and OpenGL it runs on all Windows platforms, OSX, GNU/Linux, IRIX, Solaris, HP-Ux, AIX and FreeBSD operating systems.The OpenSceneGraph is now well established as the world leading scene graph technology, used widely in the vis-sim, space, scientific, oil-gas, games and virtual reality industries.
T 1 andv T 2 , respectively, so that t * 1 , t * 2 are intersected by a segment in t * 1 and t * 2 .