12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

shrinkfacesPurpose2shrinkfacesReduce the size of patch facesSyntaxDescriptionshrinkfaces(p,sf)nfv = shrinkfaces(p,sf)nfv = shrinkfaces(fv,sf)shrinkfaces(p), shrinkfaces(fv)nfv = shrinkfaces(f,v,sf)[nf,nv] = shrinkfaces(...)shrinkfaces(p,sf) shrinks the area of the faces in patch p to shrink factor sf.A shrink factor of 0.6 shrinks each face to 60% of its original area. If the patchcontains shared vertices, <strong>MATLAB</strong> creates nonshared vertices beforeperforming the face-area reduction.nfv = shrinkfaces(p,sf) returns the face and vertex data in the struct nfv,but does not set the Faces and Vertices properties of patch p.nfv = shrinkfaces(fv,sf) uses the face and vertex data from the struct fv.shrinkfaces(p) and shrinkfaces(fv) (without specifying a shrink factor)assume a shrink factor of 0.3.nfv = shrinkfaces(f,v,sf) uses the face and vertex data from the arrays fand v.[nf,nv] = shrinkfaces(...) returns the face and vertex data in two separatearrays instead of a struct.ExamplesThis example uses the flow data set, which represents the speed profile of asubmerged jet within a infinite tank (type help flow for more information).Two isosurfaces provide a before and after view of the effects of shrinking theface size.• First reducevolume samples the flow data at every other point and thenisosurface generates the faces and vertices data.• The patch command accepts the face/vertex struct and draws the first (p1)isosurface.2-441

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

Saved successfully!

Ooh no, something went wrong!