[Experimental]

Build triangle mesh3d object from 3-D coordinates based on reference mesh with homologous vertices

convert_points_to_knownmesh(point_matrix, obj)

Arguments

point_matrix

3-D coordinates to be visualized (rows = vertices, columns = coordinates)

obj

Path to reference mesh in OBJ format

Value

Object of class mesh3d

Examples

if (FALSE) { # CREATE EXAMPLE POINT MATRIX path_to_ply <- system.file("extdata", "ply", package="facefuns") data <- read_vertices(path_to_ply) shapedata <- facefuns(data = data, pc_criterion = "broken_stick", quiet = TRUE) point_matrix <- shapedata$pc_plot$PC1$minus # PATH TO EXAMPLE REFERENCE MESH obj <- paste0(system.file("extdata", "obj", package="facefuns"), "/example.wavefront") # RUN FUNCTION mesh <- convert_points_to_knownmesh(point_matrix = point_matrix, obj = obj) # PLOT RESULT rgl::open3d() rgl::shade3d(mesh, box = FALSE, axes = FALSE, xlab = "", ylab = "", zlab = "", col = "white", specular = "black") }