Function Repository Resource:

GraphicsMetricGraph

Source Notebook

Create a mesh representing a metric from a graphic

Contributed by: Stephen Wolfram and Jan Mangaldan

ResourceFunction["GraphicsMetricGraph"][graphics]

makes a graph corresponding to a mesh representing a metric constructed from graphics.

Details and Options

ResourceFunction["GraphicsMetricGraph"] accepts options from DiscretizeGraphics and MeshConnectivityGraph, as well as the additional option PlotPoints.

Examples

Basic Examples (3) 

Generate a surface:

In[1]:=
plot = Plot3D[Sin[x + Sin[y]], {x, -Pi, Pi}, {y, -Pi, Pi}, PlotRange -> All]
Out[1]=

Produce a metric-preserving graph from the surface:

In[2]:=
ResourceFunction["GraphicsMetricGraph"][plot]
Out[2]=

Use a coarser sampling:

In[3]:=
ResourceFunction["GraphicsMetricGraph"][plot, MaxCellMeasure -> 0.4, PlotPoints -> 100]
Out[3]=

Version History

  • 1.0.0 – 24 March 2020

Related Resources

License Information