【问题标题】:Plot VoronoiDiagram using Graphics in Mathematica在 Mathematica 中使用图形绘制 VoronoiDiagram
【发布时间】:2011-09-22 14:15:48
【问题描述】:

完成有关如何在 Mathematica 中使用图形绘制 ConvexHullDelaunayTriangulation 的问题,

我现在想在 Graphics 中绘制 VoronoiDiagram

考虑

Needs["ComputationalGeometry`"]
pts = RandomReal[{0, 10}, {60, 2}];
vdpts=VoronoiDiagram[pts]

【问题讨论】:

    标签: graphics wolfram-mathematica computational-geometry voronoi


    【解决方案1】:

    怎么样

    Needs["ComputationalGeometry`"]
    pts = RandomReal[{0, 10}, {10, 2}]
    DiagramPlot[pts]
    

    还是我错过了你的意思?

    【讨论】:

    • @acl,谢谢!由于在图形中绘制 DT 的 CH 的限制,我没有考虑过,谢谢!
    • @acl,实际上,试图在我更广泛的“Manipulated Graphicsit 中实现它不适用于以下错误消息:Graphics is not a Graphics primitive nor directive :( : Needs["ComputationalGeometry`"] pts = RandomReal[{0, 10}, {10, 2}] 图形[{Gray, EdgeForm[Thin], Rectangle[{0, 0}, {5, 5}], DiagramPlot[pts]}]
    • @500 因为你正在做 Graphics[{stuff, Graphics[]}] 而你​​应该有 Show[Graphics,Graphics]。像这样: Needs["ComputationalGeometry`"] ; pts = RandomReal[{0, 10}, {10, 2}] ; Show[ Graphics[{Gray, EdgeForm[Thin], Rectangle[{0, 0}, {5, 5}]}], DiagramPlot[pts]]
    • @acl,好的,我想我明白了,我打算使用它的上下文有点特殊。我在这里上传了笔记本,因为我认为这是解释问题本质的最佳方式。您是否有一点时间检查一下,如果您仍然认为 DiagramPlot 是合适的解决方案,请告诉我。非常感谢您的关注,laeh500.com/LAEH/Voronoi.html
    • @500 好吧,我操作控件直到出现错误,然后我复制了图形(在操作内部,即不是整个操作对象),粘贴它并在末尾添加 //FullForm .它确实有:Graphics[lots of stuff,Graphics[],lots more stuff]。问题是你有Graphics[{.....,If[MemberQ[theSpan, "Fixations Voronoi Diagram |"], DiagramPlot[ rejectionX[t4dataLAEH10, 9, disp, firstFixationsNOtoConsider, durationLimit, 17, 18, 11, minDistance]\[LeftDoubleBracket]All, {1, 2}\[RightDoubleBracket]]],....}]。即,正是我上面所说的。
    猜你喜欢
    • 1970-01-01
    • 2011-03-28
    • 1970-01-01
    • 2011-09-22
    • 1970-01-01
    • 2011-05-06
    • 2011-09-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多