Custom colormap based on data values and not coordinates

6 visualizaciones (últimos 30 días)
Harold
Harold el 19 de En. de 2013
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().
  2 comentarios
Harold
Harold el 19 de En. de 2013
Thanks Walter. I meant to include that link in my post. It seems like I keep having these problems. Funny thing is that I already have coded the majority of the program but decided to switch from 2D to 3D models.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by