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

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

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

educepatchPurpose2reducepatchReduce the number of patch facesSyntaxDescriptionreducepatch(p,r)nfv = reducepatch(p,r)nfv = reducepatch(fv,r)nfv = reducepatch(f,v,r)[nf,nv] = reducepatch(...)reducepatch(p,r) reduces the number of faces of the patch identified byhandle p, while attempting to preserve the overall shape of the original object.<strong>MATLAB</strong> interprets the reduction factor r in one of two ways depending on itsvalue:• If r is less than 1, r is interpreted as a fraction of the original number of faces.For example, if you specify r as 0.2, then the number of faces is reduced to20% of the number in the original patch.• If r is greater than or equal to 1, then r is the target number of faces. Forexample, if you specify r as 400, then the number of faces is reduced untilthere are 400 faces remaining.nfv = reducepatch(p,r) returns the reduced set of faces and vertices but doesnot set the Faces and Vertices properties of patch p. The struct nfv containsthe faces and vertices after reduction.nfv = reducepatch(fv,r) performs the reduction on the faces and vertices inthe struct fv.nfv = reducepatch(p) or nfv = reducepatch(fv) uses a reduction value of0.5.nfv = reducepatch(f,v,r) performs the reduction on the faces in f and thevertices in v.[nf,nv] = reducepatch(...) returns the faces and vertices in the arrays nfand nv.RemarksIf the patch contains nonshared vertices, <strong>MATLAB</strong> computes shared verticesbefore reducing the number of faces. If the faces of the patch are not triangles,<strong>MATLAB</strong> triangulates the faces before reduction. The faces returned arealways defined as triangles.2-400

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

Saved successfully!

Ooh no, something went wrong!