Learn R Programming

Morpho (version 2.12)

getVisibleVertices: find vertices visible from a given viewpoints

Description

find vertices visible from a given viewpoints

Usage

getVisibleVertices(mesh, viewpoints, offset = 0.001, cores = 1)

Value

a vector with (1-based) indices of points visible from at least one of the viewpoints

Arguments

mesh

triangular mesh of class 'mesh3d'

viewpoints

vector or k x 3 matrix containing a set of viewpoints

offset

value to generate an offset at the meshes surface (see notes)

cores

integer: number of cores to use (not working on windows)

Examples

Run this code
SCP1 <- file2mesh(system.file("extdata","SCP1.ply",package="Morpho"))
viewpoints <- read.fcsv(system.file("extdata","SCP1_Endo.fcsv",package="Morpho"))
visivert <- getVisibleVertices(SCP1,viewpoints)

Run the code above in your browser using DataLab