Face to vertex data interpolation for patch interpolated colors
1 回表示 (過去 30 日間)
古いコメントを表示
I make a patch like so:
>> patch('verticex',xyz,'faces',conn,'faceVertexCData',c,'faceColor','flat')
In this the following is true:
>> size(xyz) == [nvertices, 3]
>> size(conn) == [nfaces, 4] % so these are quads
>> size(c,1) == nfaces
>> size(c,2) == 1;
Or in other words, I have one datavalue for the color per face and I let 'patch' figure out the color needed for each face using some colormap. This all works fine, however I want an interpolated shading (instead of flat) for the faces (and edges). It seems that I need one datavalue for the color per vertex for that, instead of one per face. Or, in other words, this must be true:
>> size(c,1) == nvertices
So the question is: is there an easy way to interpolate face data to vertex data? Of course I can think of complicated ways by first determining the center of each face, and then do a griddedinterpolant, or use a plethora of other ways. But I wondered if there is a more readymade solution for this.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Polygons についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!