登录论坛

查看完整版本 : MATLAB中的网格生成


poster
2019-12-10, 16:49
在MATLAB中 (http://en.wikipedia.org/wiki/MATLAB) ,是否有子程序接受点列表,并给我返回一个可以用来显示给同事的好网格,例如这样?

https://www.mathworks.com/access/helpdesk/help/techdoc/ref/tri_scat_interp.png

实际上,我所需要的只是一个简单的2D网格生成器,该生成器接受一系列X,Y坐标(定义区域的边界),并给我返回可以很好地对该区域进行网格化的元素列表。 我可以使用MATLAB命令对Z值进行插值来完成其余的工作。 (https://stackoverflow.com/questions/1672176/how-do-i-generate-a-3-d-surface-from-isolines)

编辑:我不感兴趣使用MATLAB来生成上述外观图。我对使用MATLAB库获取元素列表感兴趣,这样当我自己绘制这些元素时(不是在MATLAB本身;而是在我自己的C#程序中),我可以获得该网格化表面。

PS:我知道有这个DistMesh (http://www-math.mit.edu/~persson/mesh/) ,但是我正在寻找更简单的东西-也许直接在MATLAB中内置的东西。不, meshgrid (http://www.mathworks.com/access/helpdesk/help/.../meshgrid.html) 不是生成网格。


回答:
听起来好像您想创建一个有限元网格 (http://en.wikipedia.org/wiki/Finite_element_method) ,从一组定义区域边界的点开始,然后生成一个三角形网格,在该区域内创建更多点。我认为没有针对此问题的“简单”解决方案。

最近的“内置”的解决方案很可能是偏微分方程工具箱 (http://www.mathworks.com/access/helpdesk/help/toolbox/pde/) ,特别是一些的几何算法 (http://www.mathworks.com/access/helpdesk/help/toolbox/pde/ug/f7498.html#f8753)像INITMESH (http://www.mathworks.com/access/helpdesk/help/toolbox/pde/ug/initmesh.html)和REFINEMESH (http://www.mathworks.com/access/helpdesk/help/toolbox/pde/ug/refinemesh.html) 。

您提供给DistMesh (http://www-math.mit.edu/~persson/mesh/)的链接似乎是另一个很好的解决方案。在MathWorks File Exchange (http://www.mathworks.com/matlabcentral/fileexchange/)上也有一些提交,您可以看一下:


MESH2D (http://www.mathworks.com/matlabcentral/fileexchange/25555-mesh2d-automatic-mesh-generation)由达伦Engwirda (http://www.mathworks.com/matlabcentral/fileexchange/authors/22624)
Rasmus Anthin的 (http://www.mathworks.com/matlabcentral/fileexchange/authors/6906) 有限元工具箱2.1 (http://www.mathworks.com/matlabcentral/fileexchange/2808-finite-element-toolbox-2-1)


更多&回答... (https://stackoverflow.com/questions/1686265)