Plot element-wise value on a finite element grid, trisurf unable to do it ?

2 views (last 30 days)
Normally, trisurf is used to plot nodal quantity on a triangular mesh. However, I would like to plot some element-wise quantity using the following command.
trisurf(t,p(:,1),p(:,2),elewise_quantity,'edgecolor','k','facecolor','interp');
Where elewise_quantiy should be of the same dimension as p(:,1) or p(:,2), so I create elewise_quantity by associating the element-wise quantity to each node of that triangular.
In the present case, the 8 triangular element in the middle are associated with 1 and all other elements are 0-valued. There are totally 10*10*2 triangular elements.
The problem is, as shown in the picture, trisurf can't produce the effect I want. What I expect is an "exact element-wise description", i.e sharp transition at the edge
Also notice that at each corner, the display is different, this's due to the specific orientation of the triangulars.
Is there an elegant way to deal with this display issue?

Answers (0)

Categories

Find more on Visual Exploration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!