11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.4 <strong>Programming</strong> with Plot Data Structures • 241To display the gear, display these in a single PLOT3D structure. UseSTYLE(PATCHNOGRID) as a local option to the top and bottom of the gearso that they do not appear as several triangles.> PLOT3D( POLYGONS(faces, STYLE(PATCHNOGRID) ),> seq( POLYGONS(b), b=bord ),> STYLE(PATCH), SCALING(CONSTRAINED) );Note: The global STYLE(PATCH) and SCALING(CONSTRAINED) optionsapply to the whole PLOT3D structure, except where the localSTYLE(PATCHNOGRID) option to the top and bottom of the gear overridesthe global STYLE(PATCH) option.Polygon MeshesSection 6.3 describes the MESH data structure which you generate whenusing plot3d to draw a parametrized surface. This simple matter involvesconverting a mesh of points to a set of vertices for corresponding polygons.Using polygons rather than a MESH structure allows you to modify theindividual polygons.Example 1 The procedure polygongrid creates the vertices of a quadrangleat the (i, j)th grid value.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!