I have tried to view this system in 3D using patch. It is very slow. I've seen other software do this much much faster, even with transparency. What am i missing?
MATLAB: How to visualise 10000 cell volume
MATLABvisualisation
Related Solutions
Hi,
For interpolating with a different function I suggest providing ‘FaceVertexAlphaData’ in way that it captures the nature of the function, that is if quadratic interpolation is needed for vertices you may declare the FaceVertexAlphaData in a quadratic way. For example if 3 vertices are there then [1,4,9] will give same behavior as required. Currently for ‘FaceAlpha’ any other interpolation method is not present except flat and interp.
Hope it helps.
This is the intended behavior. There are two rule that determine this behavior:
- When the ‘EdgeColor’ is ‘flat’, the color/alpha of an edge is determined by the vertex that precedes the edge.
- When two edges overlap within a single patch, all but the edge belonging to the first face are discarded:
- duplicate edges are edges which share a vertex
- if you define two vertices at the same point, they are not considered the same vertex.
The second rule appears to be missing from the documentation. We will make sure to update the documentation to clarify the correct behavior.
Here is what is happening in more detail:
In the figure only one edge is transparent and the remaining edges are opaque. The transparent edge connects vertices 5 to 1.
If you separate the faces in the first patch into separate faces you get 12 edges:
Face 1 – Edge from vertex 1 to 2 – should be opaque because of vertex 1
Face 1 – Edge from vertex 2 to 5 – should be opaque because of vertex 2
Face 1 – Edge from vertex 5 to 1 – should be transparent because of vertex 5
Face 2 – Edge from vertex 2 to 3 – should be opaque because of vertex 2
Face 2 – Edge from vertex 3 to 5 – should be opaque because of vertex 3
Face 2 – Edge from vertex 5 to 2 – would be transparent because of vertex 5, but duplicate edge (Face 1) discarded
Face 3 – Edge from vertex 3 to 4 – should be opaque because of vertex 3
Face 3 – Edge from vertex 4 to 5 – should be opaque because of vertex 4
Face 3 – Edge from vertex 5 to 3 – would be transparent because of vertex 5, but duplicate edge (Face 2) discarded
Face 4 – Edge from vertex 4 to 1 – should be opaque because of vertex 4
Face 4 – Edge from vertex 1 to 5 – should be opaque because of vertex 1, but duplicate edge (Face 1) discarded
Face 4 – Edge from vertex 5 to 4 – would be transparent because of vertex 5, but duplicate edge (Face 3) discarded
The result is that the edge from 5 to 1 is transparent, while the remaining edges are opaque.
Best Answer