<HTML>
<BASEFONT SIZE="2">
<HEAD>
<TITLE>
Polytriangle 
</TITLE>
</HEAD>
<BODY BGCOLOR="white" TEXT="black">
<CENTER>
<A HREF="../../index.htm" target="_top"><IMAGE SRC="../../image/mokuji.gif"></A>
</CENTER>
<P>
<H2>
Polytriangle
</H2>
Generates a polytriangle strip. In a polytriangle strip, each vertex
makes a triangle with the previous two vertices. For a list of
N vertices, there are N-2 triangles. If your geometry shape is such
that each vertex is shared by a number of different triangles, this
type of primitive is efficient description in which to represent
your geometry shape.
<P>
Normal vector for each vertex can be specified.
<P>
<BLOCKQUOTE>
<B>Format</B>
<P>
            # Micro AVS Geom:2.10<BR>
            polytri<BR>
	    Primitive Name<BR>
	    Vertex Data Type (vertex, normal, color or normal_and_color)<BR>
	    n (number of vertices)<BR>
            X(1) Y(1) Z(1) (NX(1) NY(1) NZ(1) R(1) G(1) B(1))<BR>
            X(2) Y(2) Z(2) (NX(2) NY(2) NZ(2) R(2) G(2) B(2))<BR>
                                       .<BR>
                                       .<BR>
                                       .<BR>
            X(n) Y(n) Z(n) (NX(n) NY(n) NZ(n) R(n) G(n) B(n))<BR>
<P>
<BLOCKQUOTE>
  The basic primitive type polytri is specified in the second
  line.<BR>
  An arbitrary name is specified in the third line.<BR>
  In the fourth line, the vertex data type is defined as vertex,
  normal, color or normal_and_color.
  When the vertex data type is normal,
  the normal vector is specified for each vertex.
  When the vertex data type is color, 
  the R, G, B color values from 0 to 1 are specified for each vertex.
  When the vertex data type is normal_and_color,
  both the normal vector and the R, G, B color values are specified 
  for each vertex. 
  When the vertex data type is vertex,
  only the X, Y and Z coordinates are specified for each vertex. <BR>
  The total number of verticies is specified in the fifth line.
  From the 6th line onwards, the X, Y, Z coordinates, (normal vector
  and RGB color values) are defined.<BR>
<P>
</BLOCKQUOTE>
<P>
<B><U>Example: A polytriangle strip without normal vector or  color(pt_vertex.mgf)</U></B>
<P>
<PRE>
# Micro AVS Geometry ASCII Data Format Version: 2.10
polytri
polytri
vertex
10
1 0 1.3
1 2 1.3
2 0 0.3
2 2 0.3
3 0 0.
3 2 0.
4 0 0.3
4 2 0.3
5 0 1.3
5 2 1.3
</PRE>
<P>
<B><U>Example: A polytriangle strip with normal vector and  color(pt_normal_and_color.mgf)</U></B>
<P>
<PRE>
# Micro AVS Geometry ASCII Data Format Version: 2.10
polytri
polytri
normal_and_color
10
1 0 1.3    -0.71 0. -0.71    1.0 0. 0.
1 2 1.3    -0.71 0. -0.71    0.9 0. 0.1
2 0 0.3    -0.55 0. -0.84    0.8 0. 0.2
2 2 0.3    -0.55 0. -0.84    0.7 0. 0.3
3 0 0.      0.   0. -1.      0.6 0. 0.4
3 2 0.      0.   0. -1.      0.5 0. 0.5
4 0 0.3     0.55 0. -0.84    0.4 0. 0.6
4 2 0.3     0.55 0. -0.84    0.3 0. 0.7
5 0 1.3     0.71 0. -0.71    0.2 0. 0.8
5 2 1.3     0.71 0. -0.71    0.1 0. 0.9
</PRE>
<HR SIZE="1">
<TABLE BORDER=0 WIDTH="100%"><TR><TD ALIGN=LEFT>
<A HREF="#pagetop"><IMG SRC="../../image/pagetop.gif" ALT="UP"></A></TD><BR>
<TD ALIGN=RIGHT><FONT FACE="MS SANS SERIF" SIZE=1 COLOR="BLACK">
&copy; 1998-2008 <A HREF="http://www.kgt.co.jp/index_e.html">KGT Inc.</A>
 All rights reserved.</FONT></TD>
</TR></TABLE>
</BODY>
</HTML>
