mesh_to_graph: Transform mesh into an undirected igraph object

mesh_to_graphR Documentation

Transform mesh into an undirected igraph object

Description

Transforms a given mesh into an undirected igraph object for shortest paths and other queries.

Usage

mesh_to_graph(mesh)

Arguments

mesh

a mesh3d object

Value

A list containing a) "graph", an igraph object; b) "gVertices", a numeric vector of graph vertices; and c) "edge.curv", a numeric vector of edge curvature values, computed by adding values for the defining vertices

TODO

Write unit tests + solve the meanvb versus RMSvb issue.

Note

This is a very simple function which creates an igraph object from a mesh and computes edge weights on the basis of vertex curvature values. The only reason this has been implemented as a separate function is that it is cached, meaning that repeated calls on the same object (e.g. from sPathQuery) are fast.

Author(s)

Cornel M. Pop

Examples

data(demoSphere)
graphObj<-Lithics3D:::mesh_to_graph(demoSphere)

cornelmpop/Lithics3D documentation built on Feb. 10, 2024, 11:54 p.m.