R/convert_points_to_knownmesh.R
convert_points_to_knownmesh.Rd
convert_points_to_knownmesh(point_matrix, obj)
point_matrix | 3-D coordinates to be visualized (rows = vertices, columns = coordinates) |
---|---|
obj | Path to reference mesh in OBJ format |
Object of class mesh3d
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") }