Custom colormap based on data values and not coordinates
6 ビュー (過去 30 日間)
古いコメントを表示
I'm having a very hard time creating a colormap for the pressure distribution over a surface. My program takes in vertices and normals from an STL file and creates the model using fill3(). With the normals known, I can calculate the pressure on each facet(triangle) of interest of the model. The facets of interest are shown in red in the figure below. What I want to be able to do is plot the model and fill the facets with the appropriate colormap color that corresponds to the pressure value of said facet. Plotting function that I have seen plot the color using values from Z(height). Also when I try to use any other plotting function other than fill3(), vertices that are not supposed to be connected get connected. Is there some way I can generate my own custom colormap by providing a color for the min and max pressure and have the program interpolate the colors in between by supplying the function with the pressure values. It should also be noted that some pressure values appear more than once due to symmetry of the model. I guess the concern I am having is that I want all the pressure values to be associated with a color that I can use in the color parameter of fill3().
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!