geodesic.path | R Documentation |
Compute geodesic path from a source vertex to one or more target vertices.
geodesic.path(surface, source_vertex, target_vertices)
surface |
an |
source_vertex |
a scalar positive integer, the source vertex index in the mesh |
target_vertices |
single integer or vector of integers, the target vertices to which to compute the paths from the source_vertex. |
list of integer vectors, the paths
This can take a bit for very large graphs. This requires the optional dependency package 'Rvcg'. The backtracking is currently done in R, which is not optimal from a performance perspective. If you have a recent Rvcg version with the Rvcg::vcgGeodesicPath function, that one will be used instead, and the performance will be better.
## Not run:
sjd = fsaverage.path(TRUE);
surface = subject.surface(sjd, 'fsaverage3',
surface = "white", hemi = "lh");
p = geodesic.path(surface, 5, c(10, 20));
vis.subject.morph.native(sjd, 'fsaverage3', 'thickness', views='si');
vis.paths.along.verts(surface$vertices, p$paths, color=c("red", "yellow"));
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.