The patches within each set are composed of 16 vertices. As patches will often share a particular vertex, the vertices are stored within a separate list. The patch then references a vertex within the list. This yields a single vertex definition that has multiple instances used. A refine element specified the levels of sub-division required. The value 1 will result in the display of the defined data only.

Each patch defines four Bezier cubic splines in one direction {(a,b,c,d), (e,f,g,h) (i,j,k,l), (m,n,o,p)} and four in the other {(a,e,i,m), (b,f,j,n), (c,g,k,o), (d,h,l,p)}. Only four of these are points on the surface (a,d,p,m) and the rest are control points not on the surface.

No SVG Support

Figure 10.1: Patch Set

This is the form of the XML needed to construct such objects.

<part colour="rgb(255,0,0)">
  <patchset id="pot" use="pot">
    <refine>1</refine>
    <!--spout-->
    <patch>165,164,163,162,169,168,167,166,173,172,171,170,177,176,175,174,</patch>
    <patch>162,179,178,165,166,181,180,169,170,183,182,173,174,185,184,177,</patch>
    <patch>177,176,175,174,189,188,187,186,193,192,191,190,197,196,195,194,</patch>
    <patch>174,185,184,177,186,199,198,189,190,201,200,193,194,203,202,197,</patch>
    <vertices>
      <vertex>1.4,0.0,2.4</vertex>
      <vertex>1.4,-0.784,2.4</vertex>
       ...
    </vertices>
  </patchset>
</part>

The easiest way to improve the presentation is to split each patch into four. This is fairly straightforward and requires the midpoint to be found for each of the four Bezier curves in one direction. At the same time, the new control points for the left and right hand parts of the curve are obtained. This gives seven points for each Bezier curve (the centrepoint is shared by both the left and right parts of the curve). The same bisection is applied to these 7 curves in the other direction also resulting in 7 points for each of these making 49 points in all. These are the unique points in the 64 needed to represent the four patches (the seven points across the middle in each direction are used twice with the centre point used all four times).