Mathematica - “三角测量” - 在图形上绘制三角形网格

时间:2013-07-22 15:36:03

标签: grid wolfram-mathematica mesh

我附上的图片应该说明一切:我希望将我绘制的所有点连接起来,形成一个三角形网格。

三角形的替代也是可能的,只要结果是一个很好的,几乎是常规的图形。

enter image description here

1 个答案:

答案 0 :(得分:4)

正如评论中提到的belisarius,在Mathematica中有一个三角测量命令。它被称为PlanarGraphPlot。这是它的工作原理:

Needs["ComputationalGeometry`"]
g = Table[RandomReal[{0, 100}, 2], {i, 1, 100}];
ListPlot[g, AspectRatio -> 1]

A random graph

PlanarGraphPlot[g, LabelPoints -> False]

triangulated graph

或许,使用Show你可以将它们叠加在一起:

Show[PlanarGraphPlot[g, LabelPoints -> False], ListPlot[g, AspectRatio -> 1, PlotStyle -> {Large, Red}]]

enter image description here

相关问题