【问题标题】:Plot VoronoiDiagram with different Norms用不同的范数绘制 VoronoiDiagram
【发布时间】:2011-10-29 17:36:33
【问题描述】:

我对mathematica(使用版本8)有很大的了解。 绘制 Voronoi 图很简单,但改变规范如何?

<< DiscreteMath`ComputationalGeometry`
data2D = {{4.4, 14}, {6.7, 15.25}, {6.9, 12.8}, {2.1, 11.1}, {9.5, 
14.9}, {13.2, 11.9}, {10.3, 12.3}, {6.8, 9.5}, {3.3, 7.7}, {0.6, 
5.1}, {5.3, 2.4}, {8.45, 4.7}, {11.5, 9.6}, {13.8, 7.3}, {12.9, 
3.1}, {11, 1.1}};
DiagramPlot[data2D, LabelPoints -> False]

给我对应于 L_2 范数(欧几里得范数)的 Voronoi 图。 我也需要与 L_1-norm 和 L_infinity-norm 相关的图表...

【问题讨论】:

  • 快速浏览代码(在 v.7 中)表明规范是手动实现的,而不是使用 Norm。如果它使用Norm,您可以通过将代码包装在Block[{Norm = &lt;new norm&gt;}, ...] 中来覆盖它。
  • 是的。看来你需要自己动手
  • 我会的,如果我知道的话……我没明白你的意思……
  • Sie sollten in English zu schreiben
  • @belisarius 关闭,这里不需要“zu”

标签: graph wolfram-mathematica voronoi


【解决方案1】:

来自Mma help(只是一个近似值):

ColorCombine[{Image[ WatershedComponents[
    DistanceTransform[i, DistanceFunction -> ManhattanDistance]], 
    "Bit"], i, i}]

注意:请注意,Voronoi 多边形的凸性属性丢失了...

【讨论】:

  • @rcollyer 我刚升级了 75 美元...值得看看你是否能让你的顾问付钱
  • @yoda,它是我的机器,所以安装它我会感觉很糟糕。必须查看 IT 有哪些优惠,因为他们有很多学生/教师优惠,我认为其中包括 mma。
猜你喜欢
  • 2011-09-22
  • 2011-06-07
  • 2018-03-14
  • 2022-01-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-09-09
相关资源
最近更新 更多