MATLAB中的网格生成 [英] Mesh Generation in MATLAB
问题描述
在 MATLAB 中是否有子例程包含点列表,并且还给我一个很好的网格,可以用来展示给我的同事吗?
Is there any subroutine, in MATLAB, that takes in a list of points, and return me a good mesh that I can use to show to my colleagues, such as this?
实际上,我所需要的只是一个简单的2D网格生成器,该生成器接受一系列X,Y坐标(定义区域的边界),并给我返回可以很好地对该区域进行网格化的元素列表. 我可以通过使用MATLAB命令对Z值.
Actually, all I need is just a simple 2D mesh generator that takes in a series of X, Y coordinates (that defines the boundary of the area), and give me back a list of elements that can mesh that area well. I can do the rest by using MATLAB command to interpolate the Z value.
我不对使用MATLAB生成上述外观图不感兴趣.我对使用MATLAB库获取元素列表感兴趣,这样当我自己绘制这些元素时(不是在MATLAB本身;而是在我自己的C#程序中),我可以获得该网格化的表面.
Edit : I am not interested to use MATLAB to produce the above looking plot. I am interested in using a MATLAB library to obtain a list of elements so that when I plot those element myself (not in MATLAB itself; but in my own C# program), I can obtain this meshed surface.
PS:我知道有这个 DistMesh ,但是我在找更简单的东西-也许直接在MATLAB中内置的东西.而且不, meshgrid 是不是生成网格.
PS: I know there is this DistMesh, but I am looking for something simpler - something built-in direct in MATLAB perhaps. And no, meshgrid is not mesh generation.
推荐答案
听起来您想创建一个有限元网格,从定义区域边界的一组点开始,然后生成一个三角形网格,该三角形网格在该区域内创建更多点.我认为没有针对此问题的简单"解决方案.
It sounds like you want to create a finite element mesh, starting with a set of points defining a boundary of a region and then generating a triangular mesh that creates more points within that region. I don't think there's a "simple" solution for this problem.
最接近的内置"解决方案可能是偏微分方程工具箱,尤其是某些几何图形这样的算法,例如 INITMESH 和重新整理.
The closest "built-in" solution would probably be the Partial Differential Equation Toolbox, specifically some of the Geometry Algorithms like INITMESH and REFINEMESH.
您提供给 DistMesh 的链接似乎是另一个不错的解决方案.在 MathWorks File Exchange 上也有一些提交内容,您可以看一下:
The link you gave to DistMesh appears to be another good solution. There are also a few submissions on the MathWorks File Exchange that you could take a look at:
- MESH2D by Darren Engwirda
- Finite Element Toolbox 2.1 by Rasmus Anthin
这篇关于MATLAB中的网格生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!