How to plot a shape function of triangular element with 3 nodes ?
8 次查看(过去 30 天)
显示 更早的评论
Hi guys
I want to plot a shape function of triangular element with its equations in matlab but I can't find a way to plot a triangular area with 3 equation
I know that we can plot it with 3 points but I want to plot it with its equations of shape functions similar to below picture :
0 个评论
回答(1 个)
Mark Schoen
2019-10-15
The best way to approach plotting a filled polygonal region is to use the "patch" function,
which requires the (x,y,z) coordinates of each vertex of the shape.
For a triangle, you have three equations, each corresponding to one side, so your three vertices will be given by the intersection points between different pairs of lines. To calculate intersection points, use the "solve" function. For an example of how to use "solve" on a system of two equations, type the following into the MATLAB Command Window:
>> openExample('symbolic/SolveMultivariateEquationsAndAssignOutputsToVariablesExample')
Also, once you have plotted the 3 vertices with "patch", use the command "view(3)" to see the plot in three dimensions.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!