0
votes

I have triangulated geometry (STL file) and I have the values of a vector field for each triangle. I want to plot the triangles with the vector field on each triangle and also color the triangle according to the magnitude of the vector. Is there any way of accomplishing this using languages like python or any open-source software such as gnuplot,etc.? If not, what about software like MATLAB?

1

1 Answers

0
votes

According to http://en.wikipedia.org/wiki/STL_%28file_format%29 you can store color and normal informations in a STL binary file. I'd make a python script that creates a new binary STL where each facet (triangle) has a color and use the normal to store the vector. Then I'd import this file in Blender and ask it to display the normals and the flat face colors. You'll then do an OpenGL render (it is just a button to push) to export a PNG file of the view you want to see. Do you have a sample scene ?