Face to vertex data interpolation for patch interpolated colors

조회 수: 1 (최근 30일)
Arjan Lampe
Arjan Lampe 2021년 6월 23일
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개)

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by