We are working on plotting mesh (in hermes2d: http://hpfem.math.unr.edu/projects/hermes2d-new/) We created a python function to plot mesh but initially without curves. Later we also tried to work on curved elements but we are having some problems.
In the hermes2d examples curves are defined as [4, 7, 45] where 4,7 are vertices indices, and 45 is center angle.
But in matplotlib we do not see any function to plot curve with these data, we have to convert them into something more useful to those functions available in matplotlib. For ex:
- matplot.path porvides a way to plot curve with three points
p1 -> starting Point
p2 -> control point
p3 -> end point
iI we want to go this way we do have p1 & p3 but have to calclate p2
- matplot.patch.arc provides a way to plot an arc
but it needs
-> center of circle
-> start angle
-> end angle
-> radius of circle
we have to calculate all these with data available to us
We didn’t find other ways of plotting curves using matplotlib…and in our view method 1 is the best way for us because currently we have implemented matplotlib.path to draw mesh without curves, and it will be easy to fill color this way.
We tried the method 1 but the result was a garbled mesh. I would appreciate if anybody could guide us how we can use the matplotlib functions to draw curved elements if we are given information as described above.