| MATLAB Function Reference | ![]() |
化簡(reduce)土地(patch)表面(faces)的大小(size)。
Syntax
shrinkfaces(p,sf) nfv = shrinkfaces(p,sf) nfv = shrinkfaces(fv,sf) shrinkfaces(p), shrinkfaces(fv) nfv = shrinkfaces(f,v,sf) [nf,nv] = shrinkfaces(...)
Description
shrinkfaces(p,sf)收縮(shrinks)土地(patch)p中表面的面積(area)到收縮(shrinks)的系數(factor)sf。0.6的收縮係數(shrink factor)收縮(shrinks)每一個表面(face)到原來面積(area)的60%。如果土地(patch)含有共有(shared)的頂點,MATLAB在執行表面面積(face-area)化簡前創造不共同擁有(nonshared)的頂點。
nfv = shrinkfaces(p,sf)傳回表面和頂點資料在結構nfv,但是不會設定土地(patch)p的屬性(properties)Faces和Vertices。
nfv = shrinkfaces(fv,sf)使用來自結構fv的表面和頂點資料。
shrinkfaces(p)和shrinkfaces(fv)(不用明確說明收縮的係數)假設收縮的係數是0.3。
nfv = shrinkfaces(f,v,sf)使用來自陣列f和v的表面和頂點資料。
[nf,nv] = shrinkfaces(...)傳回表面(face)和頂點(vertex)資料以兩個分開(separate)的陣列取代結構(struct)。
Examples
這個範例使用了流向資料集(flow data set),象徵在無限大的(infinite)水缸(tank)中做潛入(submerged)噴射(jet)其速率(speed)的概況(profile)(請打help flow來獲得更多的訊息。)。兩個分離平面(isosurfaces)提供一個在收縮(shrinking)面積大小(face size)之前和之後的景觀(view)。
reducevolume在每一個其他(other)點(point)取樣(samples)流向資料(flow data),再來isosurface產生表面(faces)和頂點(vertices)資料。patch指令接受表面/頂點(face/vertex)的結構(struct)同時畫出第一個(p1)分離平面(isosurface)。daspect、view和axis指令去設定景觀(view)同時增加一個title。shrinkfaces指令調整表面/頂點(face/vertex)資料同時直接傳遞給patch。[x,y,z,v] = flow;
[x,y,z,v] = reducevolume(x,y,z,v,2);
fv = isosurface(x,y,z,v,-3);
p1 = patch(fv);
set(p1,'FaceColor','red','EdgeColor',[.5,.5,.5]);
daspect([1 1 1]); view(3); axis tight
title('Original')
figure
p2 = patch(shrinkfaces(fv,.3));
set(p2,'FaceColor','red','EdgeColor',[.5,.5,.5]);
daspect([1 1 1]); view(3); axis tight
title('After Shrinking')
See Also
isocaps, isonormals, isosurface, reducepatch, reducevolume, smooth3, subvolume
| shiftdim | sign | ![]() |